The Wayback Machine - https://web.archive.org/web/20201104093236/https://github.com/uNetworking/uWebSockets.js/issues/382
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

Incease maxPayloadLength upper limit and/or allow 0 (limitless) #382

Closed
Zabrane opened this issue Nov 1, 2020 · 5 comments
Closed

Incease maxPayloadLength upper limit and/or allow 0 (limitless) #382

Zabrane opened this issue Nov 1, 2020 · 5 comments

Comments

@Zabrane
Copy link

@Zabrane Zabrane commented Nov 1, 2020

My uWebSockets.js app daily handles large amount of data (10-35GB per conn) with no issue.
One of my colleagues tried to increase the maxPayloadLength to 100GB for stress testing but it didn't work. Apparently, there's a 50GB upper bound limit.

 maxPayloadLength: 100 * 1024 * 1024 * 1024 // failed

Is there any reason for that?

@alexhultman two suggestions if you don't mind:

  1. allow maxPayloadLength to take value 0 (no limit) and let the user handle the limit logic on his side
  2. increase the default maxPayloadLength to a much larger value: for example 100TB (see websocket-frame-size-limitation)
@Zabrane Zabrane changed the title Incease maxPayloadLength upper limit or make it limitless Incease maxPayloadLength upper limit and/or allow 0 (limitless) Nov 1, 2020
@alexhultman
Copy link
Member

@alexhultman alexhultman commented Nov 1, 2020

If you want to transfer hundreds of GB you really shouldn't use one single WebSocket message. Use streaming HTTP and you can cut your memory usage in half at least?

@Zabrane
Copy link
Author

@Zabrane Zabrane commented Nov 1, 2020

@alexhultman what maxPayloadLength is for? Is it a limitation:

  1. per message
  2. per all messages inside 1 connection
  3. for all ongoing connections
@hst-m
Copy link

@hst-m hst-m commented Nov 1, 2020

Docs for maxPayloadLength say per message

Maximum length of received message. If a client tries to send you a message larger than this, the connection is immediately closed

@Zabrane
Copy link
Author

@Zabrane Zabrane commented Nov 1, 2020

Thanks for the pointer @hst-m

@Zabrane
Copy link
Author

@Zabrane Zabrane commented Nov 1, 2020

@alexhultman our service is WebSocket based. I'm afraid the Streaming won't help.

Anyway, i can close the issue. Thanks guys

@Zabrane Zabrane closed this Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.