jsha / blocktogether

Share your blocks and subscribe to others'
GNU General Public License v3.0
330 stars 68 forks source link

ECONNRESET on long block updates #201

Open jsha opened 9 years ago

jsha commented 9 years ago

Steps to reproduce:

Get a user with > 5k blocks to the rate limit, e.g. by refreshing the my blocks page repeatedly. Push it past the rate limit, in such a way that the block batch starts but doesn't finish until fifteen minutes later.

Actual result: ECONNRESET in the update-blocks logs.

Expected result: Probably update-blocks should respond to the RPC once the rate limit is hit to avoid keeping the client waiting for an answer it probably won't care about in fifteen minutes. Also, update-blocks should catch the ECONNRESET error and not log it.

jsha commented 9 years ago

One issue with the proposal above: The fetchAndStoreBlocks promise resolution is used to determine when to clear an entry from activeFetches. Need to be able to keep the entry in activeFetches until the full batch is done.