I use the REST API to sync up NFT sales data to a local database. Every once in a while when doing the syncing, one of the queries gets stuck in the following issue:
Requesting https://deep-index.moralis.io/api/v2/nft/0x15a2d6c2b4b9903c27f50cb8b32160ab17f186e2/transfers?chain=eth&format=decimal&limit=500&offset=0 Service unavailable - trying again after 5s - https://deep-index.moralis.io/api/v2/nft/0x15a2d6c2b4b9903c27f50cb8b32160ab17f186e2/transfers?chain=eth&format=decimal&limit=500&offset=0 Full body: <html><body><h1>503 Service Unavailable</h1>No server is available to handle this request.</body></html>
(this is from my logs)
The error keeps happening until either:
- I Ctrl-C the process and start it again; or
- I let it continue until my code decides to move on to the next project to sync
Before I added code that stops trying after a number of tries, I once let this run for hundreds of attempts overnight and it did not manage to get a useful response.
But as soon as I do either of those things, the service works again immediately. This suggests, to me, there’s some other issue happening that’s not a case of “Service Unavailable” (which would suggest the server being down or some similar issue), but instead an error happening on your side when the query comes in.
I’ve been asked to post this up by Ivan on the Discord.
Thanks for looking into it