Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Richy_T on August 05, 2015, 08:25:19 PM



Title: Bitcoin API and timeouts...
Post by: Richy_T on August 05, 2015, 08:25:19 PM
If one attempts to make calls to the bitcoin API while it is still syncing, often (sometimes not), I will get a 500 error timeout. This will happen with commands such as getblockcount. Other times, I might get an error 28 (which I can deal with easily enough). getblocktemplate seems to always return (even with an error).

So my question is, what is the best way to avoid the 500 errors. Do I just need a longer timeout or is bitcoind pretty much "too busy" for the duration? Is there a strategy to use such as calling getblocktemplate first and if that doesn't return an error, I can proceed?