POST to tomcat fails if more than app. 300KB are uploaded nginx-forum at
Thu May 6 17:34:31 MSD 2010

Hi All

My nginx 0.8.35 runs in front of tomcat 6.0.26. Caching is enabled and all buffers have default size. Everything worked fine for months until I implemented a new servlet waiting for POST requests transmitting XML data in the client body to my tomcat.

When the client body is larger than approximately 335KB, tomcat does no longer receive the whole body from nginx and times out reading the client body from nginx. It looks like nginx first buffers the client body (I see the corresponding log entry) and then starts to stream the client body (i.e., the beginning of it) to tomcat.

I tried to change all possible buffer sizes in nginx and tomcat, disabled proxy buffering, and even verified that nginx has sufficient rights and space to write temporary files.

Do you have any ideas how to tell nginx to stream the whole body to tomcat? Note that it works fine for client bodies smaller than 335KB.


Posted at Nginx Forum:,83268,83268#msg-83268

More information about the nginx mailing list