Closed thinker007 closed 1 week ago
get fixed by uvicorn.run( app, host=host, port=port, log_level="debug" if state.verbose > 1 else "info", use_colors=True, log_config=None, timeout_keep_alive=60, h11_max_incomplete_event_size = 1024*1024, )
and you have to upgrade uvicorn to latest version
Hey @thinker007, thanks for raising this issue and a fix for it!
Do you mind sharing what kind of questions you're asking that result in >16Kb payload (and trigger this issue)?
get q too long cause this bug:
uvicorn.error: Invalid HTTP request h11_impl.py:132 received.
╭─ Traceback (most recent call last─╮
│ /usr/local/lib/python3.10/dist-pa │
│ ckages/uvicorn/protocols/http/h11 │
│ _impl.py:129 in handle_events │
│ │
│ 126 │ def handle_events(self) │
│ 127 │ │ while True: │
│ 128 │ │ │ try: │
│ ❱ 129 │ │ │ │ event = sel │
│ 130 │ │ │ except h11.Remo │
│ 131 │ │ │ │ msg = "Inva │
│ 132 │ │ │ │ self.logger │
│ │
│ /usr/local/lib/python3.10/dist-pa │
│ ckages/h11/_connection.py:476 in │
│ next_event │
│ │
│ 473 │ │ │ │ if len(self │
│ 474 │ │ │ │ │ # 431 i │
│ 475 │ │ │ │ │ # much │
│ ❱ 476 │ │ │ │ │ raise R │
│ 477 │ │ │ │ │ │ "Re │
│ 478 │ │ │ │ │ ) │
│ 479 │ │ │ │ if self._re │
╰───────────────────────────────────╯
RemoteProtocolError: Receive buffer
too long
try to increase max_incomplete_event_size which default is 16*1024 should resolve this bug