mathworks / mathworks/matlab-proxy
aiohttp rejects request — header exceeds 8190 bytes (max_field_size) after cookie accumulation
Open
@diningPhilosopher64 is already working on this.
Since Aug 25, 2026.
bug
development-in-progress
- Dominant language
- Python
- Stars
- 88
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Summary
After significant matlab-proxy use, client headers seem to include a a large number of sessions in the cookies. Eventually this exceeds the 8190 bytes limit, and the matlab-proxy fails.
Inspecting the cookie sent from client to server includes 22x "matlab-proxy-session" cookies with 8410 bytes of cookie length, for a total header exceeding 9000 bytes.
Clearing browser cookies fixes this issue.
Relevant details:
- matlab-proxy: 0.34.0
- aiohttp: 3.14.3
- Python: 3.14.6
- MATLAB: R2025b
- Environment: containerized/pod, hostname changes per reboot, reverse tunneled to localhost
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes when reading: b'matlab-proxy-session-8af57f6f9b7920fa2aa0c900ebca276fba8cf025e82239b99ad45e5afa67528d="gAAAAABqhxL0t...'.
Error handling request from 127.0.0.1
Traceback (most recent call last):
File "/home/user/.local/share/uv/tools/matlab-proxy/lib/python3.14/site-packages/aiohttp/web_protocol.py", line 433, in data_received
messages, upgraded, tail = self._parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 687, in aiohttp._http_parser.HttpParser.feed_data
raise ex
File "aiohttp/_http_parser.pyx", line 866, in aiohttp._http_parser.cb_on_header_value
raise LineTooLong(value[:100] + b"...", pyparser._max_field_size)
Browser(s) used
Chrome
Script output
Not run
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.