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

gunicorn throws OSError on ENOTCONN, this shuts down doc-gen worker #177

Open
KDwevedi opened this issue Jan 5, 2024 · 0 comments
Open

Comments

@KDwevedi
Copy link

KDwevedi commented Jan 5, 2024

Description

NetGen Doc-Generator Deployment (branch v2) crashes with the following error:

samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    | Traceback (most recent call last):
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/gthread.py", line 274, in handle
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     req = six.next(conn.parser)
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/http/parser.py", line 41, in __next__
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/http/message.py", line 181, in __init__
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     super(Request, self).__init__(cfg, unreader)
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/http/message.py", line 54, in __init__
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     unused = self.parse(self.unreader)
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/http/message.py", line 230, in parse
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     self.headers = self.parse_headers(data[:idx])
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |   File "/usr/local/lib/python3.8/dist-packages/gunicorn/http/message.py", line 74, in parse_headers
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    |     remote_addr = self.unreader.sock.getpeername()
samarth_doc-generator-web-service.1.lqanaq9h1t3v@e2e-78-177    | OSError: [Errno 107] Transport endpoint is not connected

This seems to be a known problem in versions of gunicorn older than 20.1.0 and was fixed in gunicorn pr #2277.

We're currently using an older version

Proposed Solution

The issue may be resolved by updating gunicorn and redeploying the service, resulting in increased stability.

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