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

exceeded 4096 byte buffer size #385

Open
cronnelly opened this issue May 12, 2022 · 2 comments
Open

exceeded 4096 byte buffer size #385

cronnelly opened this issue May 12, 2022 · 2 comments

Comments

@cronnelly
Copy link

Hi,

I found an instance of sniproxy which I run (0.6.0; Ubuntu 22.04) was occasionally failing to proxy TLS requests. In the logs I found lines like the following:

2022-05-12 15:20:54 Request from [::ffff:xx.xx.xx.xxx]:46600 exceeded 4096 byte buffer size

Working on the guess that these requests perhaps have very large HTTP headers, I replaced 4096 with 8192 throughout the codebase, and recompiled sniproxy. Since then, this issue has not reoccurred.

Perhaps this value could be tuneable in the config?

Many thanks!

@renaudallard
Copy link

Hi,
Why did you choose 8192?
Header max size is somewhat different between web servers:

Web Server Size Limit
Apache 8K
Nginx 4K-8K
IIS 8K-16K
Tomcat 8K – 48K

@cronnelly
Copy link
Author

Hi @renaudallard,

I work with Varnish Cache a lot, which also has an 8K default header limit. So chose that as a figure to test with.

However I didn't really put any more thought into it than that!

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

No branches or pull requests

2 participants