I'm having some trouble receiving large subprotocol messages using Spring Boot, Spring WebSocket and Undertow. The messages are cut off after 16kB. After doing some digging I found the following configuration property which seems to do what I want:
server.undertow.buffer-size=32768
This configuration property seems to be properly picked up when checking the /configprops actuator endpoint. Unfortunately, this doesn't seem to help in receiving messages larger than 16kB.
I also stumbled upon this ominous line from the Undertow documentation (emphasis mine):
For servers the ideal size is generally 16k, as this is usually the maximum amount of data that can be written out via a write() operation (depending on the network setting of the operating system).
This confirms what I've been experiencing that setting the server.undertow.buffer-size
has no effect as it's capped by an OS level setting. As I'm using Ubuntu Linux I have been fiddling around with net.core.rmem_*
and net.core.wmem_*
settings but these don't seem to have any effect either. It's not possible to reproduce this issue on macOS.
Does anyone know how to configure Undertow, Spring Boot, and/or Spring WebSocket to support these messages?