fastapi+uvicornでInvalid HTTP request received

invalid HTTP request received 本番環境でfastapiを動かしている時に以下のエラーが出力されました。 INFO: Started server process [9806] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) WARNING: Invalid HTTP request received. Traceback (most recent call last): File "/home/ec2-user/.local/lib/python3.7/site-packages/uvicorn/protocols/http/h11_impl.py", line 170, in handle_events event = self.conn.next_event() File "/home/ec2-user/.local/lib/python3.7/site-packages/h11/_connection.py", line 443, in next_event exc._reraise_as_remote_protocol_error() File "/home/ec2-user/.local/lib/python3.7/site-packages/h11/_util.py", line 76, in _reraise_as_remote_protocol_error raise self File "/home/ec2-user/.local/lib/python3.7/site-packages/h11/_connection.py", line 425, in next_event event = self....

March 22, 2022 · 2 min