RandomAPI / Randomuser.me-Node

Source code that powers randomuser.me
https://randomuser.me
MIT License
1.34k stars 268 forks source link

503 Service Not Available #184

Closed pc1oad1etter closed 2 years ago

pc1oad1etter commented 3 years ago

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.

youngsoul commented 3 years ago

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.

pc1oad1etter commented 3 years ago

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

richardthombs commented 3 years ago

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)));
  }
keitharm commented 2 years ago

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.