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

[BUG] Gunicorn raises InvalidHTTPVersion #98

Open
Casper-Guo opened this issue Aug 26, 2024 · 1 comment
Open

[BUG] Gunicorn raises InvalidHTTPVersion #98

Casper-Guo opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Casper-Guo
Copy link
Owner

The following traceback is occasionally seen in the server log:

[2024-08-26 01:50:02 +0000] [125153] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 134, in handle
    req = next(parser)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/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 "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/http/message.py", line 257, in __init__
    super().__init__(cfg, unreader, peer_addr)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/http/message.py", line 60, in __init__
    unused = self.parse(self.unreader)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/http/message.py", line 281, in parse
    self.parse_request_line(line)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/http/message.py", line 445, in parse_request_line
    raise InvalidHTTPVersion(self.version)
gunicorn.http.errors.InvalidHTTPVersion: <exception str() failed>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 70, in run_for_one
    self.accept(listener)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 32, in accept
    self.handle(listener, client, addr)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 158, in handle
    self.handle_error(req, client, addr, e)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/workers/base.py", line 225, in handle_error
    mesg = "Invalid HTTP Version '%s'" % str(exc)
  File "/home/robery/Armchair-Strategist/env/lib/python3.10/site-packages/gunicorn/http/errors.py", line 56, in __str__
    return "Invalid HTTP Version: %r" % self.version
TypeError: not all arguments converted during string formatting
[2024-08-26 01:50:02 +0000] [125153] [INFO] Worker exiting (pid: 125153)
[2024-08-26 01:50:02 +0000] [124864] [ERROR] Worker (pid:125153) exited with code 255
[2024-08-26 01:50:02 +0000] [124864] [ERROR] Worker (pid:125153) exited with code 255

Discussion

@Casper-Guo Casper-Guo added the bug Something isn't working label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@Casper-Guo and others