Blockchair/Blockchair.Support

Code 500 - Error: addresses table is being repopulated when calling /addresses/balances

Closed this issue · 1 comments

I regularly want to call /addresses/balances with a set of addresses in the litecoin and bitcoin networks but the API call sometimes returns:

response: {
   "data":null,
   "context":{
        "code":500,
        "error":"`addresses` table is being repopulated, please try again",
    ....
   }

After waiting a minute most time it works normally. This seems to happen quite often. As I will call this from a cron job I can time the call. Can you please let us know how often the database is updated and when (i.e. every 5 minute on minute 1,6,11,16 or so) and how long does the update take? This allows me to time the request.

It takes several seconds to repopulate the data, and there's no precise schedule, unfortunately (it is run approximately every 10 minutes). Generally, if you're faced with code 500, try to wait for a couple of seconds, and request the same data once again. Thanks!