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

Messages using SimpleJsonProtocol are limited to 64 KiB (LimitOverrunError) #939

Closed
Askaholic opened this issue Dec 19, 2022 · 1 comment
Labels

Comments

@Askaholic
Copy link
Collaborator

The default limit for StreamReader.readline is to stop after 64 KiB. It seems that this limit is sometimes being reached:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 540, in readline
    line = await self.readuntil(sep)
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 635, in readuntil
    raise exceptions.LimitOverrunError(
asyncio.exceptions.LimitOverrunError: Separator is found, but chunk is longer than limit

This probably never happened with the QDataStream protocol because it doesn't use readline, instead implementing the message deserialization in python using readexactly.

There are some messages that the client sends which can be pretty large, in particular the GameStats message contains a large JSON structure which can probably exceed the 64 KiB limit. We probably need to increase that limit to something much higher.

@Askaholic Askaholic added the bug label Dec 19, 2022
Askaholic added a commit that referenced this issue Dec 28, 2022
…943)

* Parametrize lobby_server fixture for both protocol types

* Increase buffer limit to 10 MiB

* Move error message closer to read calls
@Askaholic
Copy link
Collaborator Author

We don't seem to have encountered this error for quite some time now, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant