-
Notifications
You must be signed in to change notification settings - Fork 542
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
Process stop listening on tcp port when multiple tasks are running on the same event loop #81
Comments
hi, i test it but i can`t reproduct it.
|
You have to start the application without mongodb running (or with an invalid host), the problem happens after the first connection retry (about 5 seconds after the process started) |
This happens because you don't save a reference to the server object that Anyways, this is something where asyncio and uvloop behave a bit differently. I'll fix this in the next release. |
Fixed in master, will be in the next release (soon) |
Please try uvloop v0.9.0. |
I was trying to create a HTTP service that connects to a mongo database to provide a CRUD API, that implemented some logic to reconnect to the mongo database if the connection was not available when the process started.
The problem I found is that the process stops listening on the HTTP TCP port after the first timeout of the connection to the mongo database. The problem does not happen when I use the default python event loop. I was trying to use the sanic library to implement the HTTP API, but the problem also happened when I switched to the
aiohttp.web
library, so this problem probably is not linked to a specific library code.Here are the libraries versions that I used and the code that causes the problem:
EDIT: forgot to add the output log
output:
The text was updated successfully, but these errors were encountered: