You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uvloop blocks app and not executes aiohttp server #425
Hi! I have very strange bug.
On server (only on the one - i cant reproduce error on others) i m tryin to start application using uvloop. Here is the code (i tried using docker, or executing script - result was the same) in console:
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) # here i tried uvloop.install()
from aiohttp import web
app = web.Application()
web.run_app(app, port=17000)
And after that nothing happens! Moreover, i can't stop process using Ctrl+C or Ctrl+D - only kill from other console
*i changed ports and got same results
uvloop version: 0.15.3
OS Version:
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
Sounds like the 17000 port is used by something else on that particular server. And most likely aiohttp has some timeout/retry logic in place and waits for it to become available. I don't think this is a uvloop bug. That said, check what happens if you don't activate uvloop -- does vanilla asyncio behave differently?
Sounds like the 17000 port is used by something else on that particular server. And most likely aiohttp has some timeout/retry logic in place and waits for it to become available. I don't think this is a uvloop bug. That said, check what happens if you don't activate uvloop -- does vanilla asyncio behave differently?
As i mentioned - i used different ports - like 8023, 7091, 17091, 17000, 80 and several another with same result
Yes, if i run just
from aiohttp import web
app = web.Application()
web.run_app(app, port=17000)
everything works fine.
It's really strange. Seems that i have some hardware or system problem, because on other machine with same software i don't get this bug. But how to find out it - i dont know(
If I have only one pod - it was ok, but when I start 2nd pod - pod doesn't listen 8080 port
My system: sh-4.2# cat /etc/*release : CentOS Linux release 7.8.2003 (Core)
If I run without uvloop.install() - it was ok.
When I set Debug mode: PYTHONASYNCIODEBUG=1
I finally got a log:
WARNING:asyncio:create_server() failed to create socket.socket(10, 1, 6)
Traceback (most recent call last):
File "uvloop/loop.pyx", line 1745, in uvloop.loop.Loop.create_server
File "/usr/local/lib/python3.9/socket.py", line 232, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
Activity
1st1 commentedon Jul 21, 2021
Sounds like the 17000 port is used by something else on that particular server. And most likely aiohttp has some timeout/retry logic in place and waits for it to become available. I don't think this is a uvloop bug. That said, check what happens if you don't activate uvloop -- does vanilla asyncio behave differently?
semakmillev commentedon Jul 21, 2021
from aiohttp import web
app = web.Application()
web.run_app(app, port=17000)
everything works fine.
It's really strange. Seems that i have some hardware or system problem, because on other machine with same software i don't get this bug. But how to find out it - i dont know(
roman27t commentedon Sep 24, 2021
Hello.
I have the same issue after upgrade libs:
If I have only one pod - it was ok, but when I start 2nd pod - pod doesn't listen 8080 port
My system:
sh-4.2# cat /etc/*release : CentOS Linux release 7.8.2003 (Core)If I run without
uvloop.install()- it was ok.When I set Debug mode: PYTHONASYNCIODEBUG=1
I finally got a log:
nehanagendra02 commentedon Oct 8, 2021
@bumer-t , @semakmillev were you able to figure out the root cause or solution to this problem? I am facing similar issues.
kfur commentedon Oct 11, 2021
Try set ipv4 address, because by default it will try to bind to ipv6 first