steemit / sbds

Steem Blockchain Data Service
https://developers.steem.io/#services-sbds
Other
37 stars 23 forks source link

chain get-blocks can't handle Request Timeout #84

Open Gandalf-the-Grey opened 6 years ago

Gandalf-the-Grey commented 6 years ago

while I was doing: sbds chain get-blocks --start 5000001 --end 10000000 --max_workers 10 I got sbds.http_client.RPCError: Request Timeout and sbds exists.

Handling temporary issues (retry x times) would be very helpful.

Traceback (most recent call last):
  File "/home/steem/.local/bin/sbds", line 9, in <module>
    load_entry_point('sbds==0.1', 'console_scripts', 'sbds')()
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/steem/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/steem/.local/lib/python3.5/site-packages/sbds/chain/cli.py", line 121, in get_blocks_fast
    for block in json_blocks:
  File "/home/steem/.local/lib/python3.5/site-packages/sbds/chain/cli.py", line 146, in _get_blocks_fast
    for b in executor.map(rpc.get_block, chunk):
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 556, in result_iterator
    yield future.result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 398, in result
    return self.__get_result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/steem/.local/lib/python3.5/site-packages/sbds/http_client.py", line 127, in exec
    return_with_args=return_with_args)
  File "/home/steem/.local/lib/python3.5/site-packages/sbds/http_client.py", line 148, in _return
    raise RPCError(error_message)
sbds.http_client.RPCError: Request Timeout