Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API's slow response #542

Closed
AryanXdProYT opened this issue Dec 2, 2020 · 11 comments
Closed

API's slow response #542

AryanXdProYT opened this issue Dec 2, 2020 · 11 comments

Comments

@AryanXdProYT
Copy link

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
Copy link
Author

Please Fix to it asap

@Naramsim
Copy link
Member

Naramsim commented Dec 2, 2020

@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 Naramsim changed the title High Ping of API in Python API's slow response Dec 2, 2020
@Naramsim
Copy link
Member

Naramsim commented Dec 2, 2020

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

@AryanXdProYT
Copy link
Author

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
Copy link
Member

Naramsim commented Dec 2, 2020

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
Copy link
Member

phalt commented Dec 3, 2020

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
Copy link
Author

AryanXdProYT commented Dec 4, 2020 via email

@Kronopt
Copy link
Member

Kronopt commented Dec 4, 2020

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
Copy link
Member

Naramsim commented Dec 4, 2020

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
Copy link
Author

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

@Naramsim
Copy link
Member

Naramsim commented Dec 4, 2020

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:

  • Use a Python module to make HTTP requests
  • Open a feature request in one of those two repositories
  • Use the dex endpoint to list all pokemons belonging to a specific pokedex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants