Comfy-Org / Comfy-Org/ComfyUI

aiohttp.http_exceptions.LineTooLong: 400, message: Got more than 8190 bytes when reading Status line is too long.

Open
#6,957 2 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Expected Behavior

Receive the message of the status on the WebSocket channel

### Actual Behavior

The aiohttp server is throwing an exception with line too long. This is a known issue from the aiohttp.

The solution is to increase the max line size when the client is created.

```
server.py

runner = web.AppRunner(self.app, access_log=None, max_line_size=8190 * 2, max_field_size=8190 * 2)
```

this is the bug report and here is the SO solution link

https://github.com/rckclmbr/pyportify/issues/117
https://stackoverflow.com/questions/69239895/aiohttp-got-more-than-8190-bytes-xxxx-when-reading-header-value-is-too-long

### Steps to Reproduce

Connect to the server with a websocket client or watch the logs

### Debug Logs

```powershell
Traceback (most recent call last):
File "/home/gbieler/GitHub/ComfyUI/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
File "aiohttp/_http_parser.pyx", line 682, in aiohttp._http_parser.cb_on_url
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes (19653) when reading Status line is too long.
Error handling request from 127.0.0.1
Traceback (most recent call last):
File "/home/gbieler/GitHub/ComfyUI/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
File "aiohttp/_http_parser.pyx", line 682, in aiohttp._http_parser.cb_on_url
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes (17261) when reading Status line is too long.
Error handling request from 127.0.0.1
Traceback (most recent call last):
File "/home/gbieler/GitHub/ComfyUI/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
File "aiohttp/_http_parser.pyx", line 682, in aiohttp._http_parser.cb_on_url
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes (33385) when reading Status line is too long.
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.