-
Notifications
You must be signed in to change notification settings - Fork 15
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
Retry on EADDRINUSE. #102
Retry on EADDRINUSE. #102
Conversation
started = True | ||
except OSError as e: | ||
if e.errno is errno.EADDRINUSE: | ||
await asyncio.sleep(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this log as a warning? Otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there other socket errors we might get? Is this needed elsewhere too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_start_server()
logs at error level already.
run_es_notifier()
looks like it would be vulnerable to the same thing. I have not seen it in the test failures, but that could be because tests don't stop/start elastic sync a lot.
I haven't been able to determine whether there are other transient error codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed run_es_notifier()
in similar way. Added broad logging of Exception types.
3e5779a
to
4ce3661
Compare
Fixes #101
EADDRINUSE may appear in other tests or with other components, but I think this will fix the hub.herald.session one.