PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.13k stars 931 forks source link

API's slow response #542

Closed AryanXdProYT closed 3 years ago

AryanXdProYT commented 3 years ago

I am using this api since some weeks and it was working perfectly and i am using Pokepy moduke of it but today the api response time is taking 6min to get a pokemon or anything i have tested alot i used pokebase and pokepy to check but noth taking time to get the data from website please check to it since my discord bot is totally shutdown due to this. Here is the Proof of output when i try in console it takes 6 Minutes to response Screenshot_2020-12-02-16-15-56-92_c759c44d10a956b96f85cc66750ff86e

Thank you

AryanXdProYT commented 3 years ago

Please Fix to it asap

Naramsim commented 3 years ago

@AryanXdProYT Hi.

I experienced also a slowdown followed by a 504. But that happened only once. Our monitoring page and our GCP alerts didn't log any downtimes nor slowdowns.

I strongly suspect that Cloudflare, for some of the requests, is having some troubles processing your requests. Maybe you have been rate-limited. Could you tell me the location of the server where you're having these slowdowns?

We cannot really do anything about it.

Naramsim commented 3 years ago

Also, are you sure that it's not your network that's slow?

AryanXdProYT commented 3 years ago

I has been using it in my mobile since 2-3 weeks working perfectly with max 5 seconds response but from today its response is taking time now the time is like 15min per response

Naramsim commented 3 years ago

Well, first of all, the API should reply back in max 500ms, not 5 seconds. So if you're getting those times something is slow on your end.

I don't know how to help you, tbh. Let's keep this issue open for some days to see if other users are experiencing the same.

phalt commented 3 years ago

Please Fix to it asap

This is not a good attitude, we're volunteers, and humans. Please be polite!

Fifteen minutes is an insane response time given that most HTTP clients time out after 60 seconds, I suspect something is up with your network configuration.

This is a great reminder to always cache results and don't rely on third party APIs!

AryanXdProYT commented 3 years ago

I am really sorry for that but i didnt mean rude to you but forgive me for that , and today its was working fine so i think to tell you , and also i want to ask ine more thing in pokepy pokepy.V2Client().get_pokemon(limit=100,offset=0) only showing first 20 can u help me with this Thank you and really srry but i didnt mean to be rude to you

On Thu, Dec 3, 2020, 9:42 AM Paul Hallett notifications@github.com wrote:

Please Fix to it asap

This is not a good attitude, we're volunteers, and humans. Please be polite!

Fifteen minutes is an insane response time given that most HTTP clients time out after 60 seconds, I suspect something is up with your network configuration.

This is a great reminder to always cache results and don't rely on third party APIs!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PokeAPI/pokeapi/issues/542#issuecomment-737653468, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARXBJEVRTFIB6KMRVQT2UN3SS4F2BANCNFSM4UKJ5IPQ .

Kronopt commented 3 years ago

What you're doing is not specified in the pokepy documentation.

Pokepy doesn't actually implement the limit and offset parameters. You're basically calling the API with the default pagination parameters of limit=20 and offset=0.

Naramsim commented 3 years ago

Thanks @Kronopt for pointing it out. @AryanXdProYT, I suggest you to read the documentation of pokepy before using it.

I'm closing this issue since no one else reported the API being slow and also because it has diverged from the original question.

AryanXdProYT commented 3 years ago

Ohk So can u tell how can i get the pokemons list sorted by dex through pokepy or any module in python

Naramsim commented 3 years ago

Apparently, you cannot retrieve a root endpoint using that wrapper. I checked also https://github.com/PokeAPI/pokebase but no luck.

Your best bet right now is to: