PokeAPI/pokeapi

PokeApi Outage

Closed this issue ยท 30 comments

There have been some reports both in Slack and in #350 of PokeApi being down. I can confirm that most resource requests don't work, but resource list requests do. For example: https://pokeapi.co/api/v2/pokemon/32/ returns a 500 Internal Server Error.

Interestingly enough, the same problem appeared on my local instance of PokeApi too after I reset the volumes and restarted the application. It's not just prod.

My spitball guess is it's either a broken dependency or some sort of bug caused by system time rolling past a certain value. Anyone got any idea?

(Please ignore the reply I made earlier and deleted -- I forgot to build_all)

You can see the updater bot was affected with its own local pokeapi instance here: PokeAPI/api-data#8. Resource lists are regenerated fine, but regular resources are 500.

For me, the problem doesn't happen on every run (even though each run is from a fresh clone and a clean docker environment)

I can confirm the issue too, http code returned is 500 for single resources (for instance https://pokeapi.co/api/v2/pokemon/1/)

@sargunv Hi, I am a super novice developer making a map utility app using pokeAPI. I know this is unrelated to the post, but I wanted to ask you about how you created your local instance of the API? I eventually want to port to Android and running offline will be essential. How do I get a permanent local copy of the database?

Hi @Zo-Bro, we'd love to help you out - can you please either create a new issue though or ask in the Slack team? Will help this discussion focussed. In the meantime there are instructions for getting started with a local instance here, but do feel free to ask if you need help.

I'm getting a similiar issue that's outputting "Whoops! That's not allowed!" on the page and returning a 404 error in the console:

Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.js:1
Source map error: request failed with status 404
Resource URL: https://pokeapi.co/static/pokemon/js/jquery.js
Source Map URL: jquery.min.map

@phalt could you look into this? Afaik none of the other maintainers have access to the current prod instance of the service.

phalt commented

@sargunv I do not have time. Someone from the new @PokeAPI/contributors team email me your email and I'll invite you to the digital ocean group.

paulandrewhallett[at]gmail[dot]com

Thanks @phalt, e-mail sent. Other @PokeAPI/contributors I'll be in touch with access for you as well soon.

People have asked how long this might take to resolve - unfortunately at this stage the answer is: as soon as someone can look into it.

We don't know exactly what's happening. If anyone can help to figure it out, please shout out (@sargunv mentioned a potential cause in the first post of this issue).

@sargunv You had a bit of insight into this - do you think this is fixable/worth fixing? Or should we just deploy static files on the current server if you can still build them fairly easily?

EDIT: Actually, I might just temporarily deploy the static files from api-data to get it back up for now - will advise once I have access and can do it!

Hey guys, I don't know how to solve the actual problem that's occurring, so I've done a bit of a patch job and cloned the static API data from https://github.com/PokeAPI/api-data/ and replaced the base URLs.

So, the API should now (largely) be back up. There may be edge cases that don't work they way they did before, however.

I haven't put the documentation site back up yet, and probably won't get a chance to look at that tonight, but I'll touch base with other maintainers on Slack and see if they can help.

@tdmalone

I don't have a ton of insight atm other than the problem seemed to be happening on a local instance too occasionally (but I couldn't reproduce reliably). I'd be happy to take a look at the prod instance during the weekend if you give me access.

tien commented

@tdmalone cheers ๐Ÿป the static API worked for node js. But on browser applications, I get "Cross-Origin Request Blocked" error, just need the server to have the "Access-Control-Allow-Origin" header I think

It looks like the api-data repo only includes JSON files for resources by ID, but not by name (e.g. http://pokeapi.co/api/v2/pokemon/bulbasaur/), so the API is only halfway back up.

Ah, I didn't realize you could request by name, since there's no link to those in the resource lists. Is it a feature we need to support in the new version? If so Ditto will need to produce those files in the transform step.

Ah... yes weโ€™ll need to add support for that then!

Yes, please. I for one use the named calls in a few places for my application

Website & docs should be back up now too, thanks to @Naramsim and @cmmartti

v1 API is partially back online for those who use that, but there are broken things there.

Also @crazycat9x we think we mightโ€™ve fixed the CORS issue now - can you confirm?

tien commented

@tdmalone Yes, can confirm ๐ŸŽ‰ and can also confirm that this static approach is blazing fast 2 ๐Ÿ™‚

@crazycat9x Awesome - thatโ€™s great to hear! And we havenโ€™t even moved it to the static-optimised hosting yet :)

I'm running into CORS errors in the API explorer on the homepage, even though the origin and the API are on the same domain. I didn't have any issues with the Netlify-hosted API. I don't know if this is a problem with the server or the web app.

@cmmartti That was definitely working several hours ago... @Naramsim do you know if your changes to the CORS headers would have affected that?

Per #371, it actually seems to be a problem with the URLs not ending in slashes.

Ohh right. Interesting. The API explorer definitely worked when I tried it earlier.. so either we removed the slashes in the explorer, or the CORS fix broke it ๐Ÿ˜›

It worked before I changed the URL, but not after. I just didn't have time at the moment to diagnose it.

Just summarising that the only outstanding part of this ticket (as far as I can tell) is getting named resources (eg. /pokemon/bulbasaur) back up. @sargunv is working on that now (PokeAPI/ditto#33).

If anyone else is experiencing any other issues just let us know!

#372 brought up the issue of broken pagination with offset/limit. Obvious in hindsight, but not something I thought to consider. I will add this to the alert message on the website.

Anyway, this error will not break client apps.

Not all, but it might break some.

New ticket to track named resources outage: #373

I'm now closing this ticket, as all other issues in here have been resolved (or placed into other tickets).