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

Periodic 502 status codes with nginx+gunicorn+django #2064

Open
laukhin opened this issue Jun 26, 2019 · 0 comments
Open

Periodic 502 status codes with nginx+gunicorn+django #2064

laukhin opened this issue Jun 26, 2019 · 0 comments

Comments

@laukhin
Copy link

laukhin commented Jun 26, 2019

Hi
We're using gunicorn with nginx in production with this configuration:

-k eventlet -w 8 --max-requests 1000 --reload --timeout 600

gunicorn version is 19.6.0
One of our endpoints is processing a lot of requests for a short period of time and sometimes gunicorn terminates connection, which leads to a 502 status code on nginx.
Sometimes it follows with this message:

[2019-06-25 08:18:35 +0000] [8498] [ERROR] Socket error processing request.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/async.py", line 62, in handle
six.reraise(*sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/gunicorn/six.py", line 625, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/async.py", line 35, in handle
istener_name = listener.getsockname()
OSError: [Errno 9] Bad file descriptor

This looks exactly like issue in #1725 PR, but as i can see this PR wasn't merged. Is this problem still relevant for 19.9.0? Can you suggest any workarounds to avoid this kind of errors, if gunicorn upgrade won't help?

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