RandomAPI/Randomuser.me-Node

503 Service Not Available

Closed this issue · 4 comments

Over the last two weeks I have received this error from API requests many times: 503 Service Not Available.

I have not been able to figure out the cause.

Where are you running the request from? If I run the request from a non-AWS instance ( e.g. my local machine from home ) it works. If I run it from an EC2 ( same python code ), I get a 503. I think they have been getting hit with DDoS attacks and are blocking traffic from certain ips.

BTW - I was using the API running in a lambda as part of demo and it worked fine a few months ago and stopped recently.

I am sending it through a third party service (ManyChat); I'm not sure what cloud service they use, if any.

I'm getting it on about 50% of my requests sent via a web browser:

  userIds: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  users: any[] = [];

  ngOnInit() {
    this.userIds.forEach(id => fetch("https://randomuser.me/api", { mode: "no-cors" }).then(r => this.users.push(r.json)));
  }

We were having some web server issues at the time. Some server upgrades will be coming in the near future after the v1.4 update comes out later this week to help prevent the api from overloading.