islamic-network / api.aladhan.com

The AlAdhan API
GNU General Public License v3.0
118 stars 30 forks source link

Getting status code 429 often #31

Closed usmanp24 closed 4 years ago

usmanp24 commented 4 years ago

Hi, First of all, Thanks for this great product. Secondly, I am using api.aladhan.com to get the timings of namaz in my project and often i get status code 429. So my question is what is Maximum requests per minute set in api.aladhan.com server? And can it be increased?

meezaan commented 4 years ago

Salaam @usmanp24. Can you please confirm if you are coming over IPv4 or IPv6. Due to the limitations of container orchestration platforms today, the IPv6 request pool is shared.

If you're coming over IPv4, can you please share your IP address?

usmanp24 commented 4 years ago

WalaikumSalam, I am coming from ipv4. And the IP of the server is 15.185.125.160 Thanks,

meezaan commented 4 years ago

I see 2 of 80 requests with a 429 in the last 24 hours from that IP. Does that sound right?

That's nowhere near the threshold. I will investigate.

usmanp24 commented 4 years ago

Yes, I have received two 429 response in last 24 hours so far. Currently APP is in Development state and soon will be made LIVE for the end users. And these requests will increase drasatically. So will you please tell me what is the threshold value? Thanks,

meezaan commented 4 years ago

The threshhold is 250 requests every 30 seconds. If you have a genuine use case I can give you an API key and increase the limit. But you clearly didn't make that number of requests so i need to have a look at why you got the 429.

Please give me a couple of days - I coded the firewall myself but it's been a while.

usmanp24 commented 4 years ago

Thanks a lot Please do let me know about the investigations. And it will be great if you can provide the API key and increase the limit because I may need to use it.

usmanp24 commented 4 years ago

Here is my email address: usmanp.24@gmail.com Please share the API key if it is easy for you to do it. Thanks

usmanp24 commented 4 years ago

Assalam-o-Alaikum, Did you get the chance to look at this issue. I have been getting 429 more and more lately. Thanks,

meezaan commented 4 years ago

Alaykum Salaaam Usman. Sorry i have been away for a couple of days and will send you something today insha Allah.