Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noisy logging on server timeout #59

Open
benbariteau opened this issue Feb 22, 2018 · 0 comments
Open

Noisy logging on server timeout #59

benbariteau opened this issue Feb 22, 2018 · 0 comments

Comments

@benbariteau
Copy link
Member

benbariteau commented Feb 22, 2018

I'm seeing a lot of these:

Unhandled error in EventualResult
Traceback (most recent call last):
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
    self._runCallbacks()
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 500, in errback
    self._startRunCallbacks(fail)
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/nail/home/bariteau/pg/repl-delay-update-daemon/venv/lib/python3.6/site-packages/fido/fido.py", line 234, in handle_timeout_errors
    "send the response".format(timeout=timeout)
fido.exceptions.HTTPTimeoutError: Connection was closed by fido because the server took more than timeout=None seconds to send the response

With code that looks like:

import fido
from crochet import TimeoutError

future = fido.fetch(
    'http://example.com/resource',
)
try:
    future.wait(timeout=1.0)
except TimeoutError:
    pass
finally:
    future.cancel()

While hitting a server that takes longer than 1 second to respond.

I don't expect this to timeout all the time, but it happens often enough that it's a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant