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
Due to internal limits the actual maximum payload size is 64Mb. Beyon… #2407
Conversation
…d that the subscribing process is unable to receive the messages, so adjusting the maximum size the server allows you to set for `max_payload`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thx
@jnmoyne @derekcollison Having second thoughts on this one. What would be the internal limit that would cause the max_payload to be limited to 64MB (note that I personally think that one should not set a max_payload this high anyway, so ok with limiting, but..). |
It was the default max for the dynamic buffers etc IIRC. I still like it, agree something off if you are going higher.. |
This is related to PR #2407. Since the 64MB pending size is actually configurable, we should fail only if max_payload is greater than the configured max_pending. This is done in validateOptions() which covers both config file and direct options in embedded cases. The check in opts.go is reverted to max int32 since at this point we don't know if/what max_pending will be, so we simply check that it is not more than a int32. For the next minor release, we could have another change that imposes a lower limit to max_payload (regardless if max_pending is higher). Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
I actually checked first if the limit was max_pending rather than specifically 64MB and it's actually not. If you set max_pending (and max_payload) to something more than 64MB and try to send a message above 64MB you get a different error message on the server and slightly different behavior on the subscriber side but it still doesn't work. |
Works for me:
server starts:
Then use nats-bench to send a 64MB+1024:
|
…d that the subscribing process is unable to receive the messages, so adjusting the maximum size the server allows you to set for
max_payload
.Resolves #NNN
git pull --rebase origin main
)Resolves #
Changes proposed in this pull request:
max_payload
, adjusted the max value to be 64MB/cc @nats-io/core