-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
After upgrading from version 20.1.0 to 22.0.0, we have encountered "Error handling request (no URI read)" errors.
[ERROR] 2024-05-10 10:15:49,532 gunicorn.error: Error handling request (no URI read)
Traceback (most recent call last):
File "/app/env/lib64/python3.8/site-packages/gunicorn/workers/base_async.py", line 48, in handle
req = next(parser)
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/parser.py", line 42, in __next__
self.mesg = self.mesg_class(self.cfg, self.unreader, self.source_addr, self.req_count)
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/message.py", line 257, in __init__
super().__init__(cfg, unreader, peer_addr)
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/message.py", line 60, in __init__
unused = self.parse(self.unreader)
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/message.py", line 269, in parse
self.get_data(unreader, buf, stop=True)
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/message.py", line 260, in get_data
data = unreader.read()
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/unreader.py", line 37, in read
d = self.chunk()
File "/app/env/lib64/python3.8/site-packages/gunicorn/http/unreader.py", line 64, in chunk
return self.sock.recv(self.mxchunk)
File "/app/env/lib64/python3.8/site-packages/gevent/_socketcommon.py", line 666, in recv
self._wait(self._read_event)
File "src/gevent/_hub_primitives.py", line 317, in gevent._gevent_c_hub_primitives.wait_on_socket
File "src/gevent/_hub_primitives.py", line 322, in gevent._gevent_c_hub_primitives.wait_on_socket
File "src/gevent/_hub_primitives.py", line 304, in gevent._gevent_c_hub_primitives._primitive_wait
File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_hub_primitives.py", line 55, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
greenlet.GreenletExit
/var/log/messages
gunicorn: [2024-05-10 10:15:49 +0000] [24020] [INFO] Booting worker with pid: 24020
gunicorn.conf.py
import os
import sys
import gunicorn
gunicorn.SERVER_SOFTWARE = '-'
bind = '0.0.0.0:9000'
workers = 8
worker_class = 'gevent'
max_requests = 5000
max_requests_jitter = 50
keepalive = 45
raw_env = ['SCRIPT_NAME=/xxx']
def pre_exec(server):
"""
Resets the working directory of the server to current symlink.
"""
app_root = '/app'
server.START_CTX['cwd'] = app_root
os.chdir(app_root)
orig_path = os.path.dirname(sys.executable)
new_path = os.path.join(app_root, 'env', 'bin')
server.START_CTX[0] = server.START_CTX[0].replace(orig_path, new_path)
server.START_CTX['args'] = [arg.replace(orig_path, new_path)
for arg in server.START_CTX['args']]
gunicorn -c /app/xxx/gunicorn.conf.py -p /run/xxx.pid xxx.wsgi
Env:
- gunicorn==22.0.0
- gevent==24.2.1
- greenlet==2.0.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels