Report this

What is the reason for this report?

nginx keeps buffering POST requests

Posted on April 21, 2014

Hi All,

In the last 2 weeks one of my VPS (2GB ram, 20GB space, Fedora core 17, nginx 1.0.15) started behaving weirdly. Nginx is running on port 80 and proxying requests to apache on 8080.

When I try to edit/publish a post in WordPress (3.9) the browser just hangs. The server at that moment wasn’t busy at all. There were just about several requests.

When I access the site at port 8080 it updates very quickly.

2014/04/20 19:26:39 [warn] 13347#0: *1677851 a client request body is buffered to a temporary file /var/lib/nginx/tmp/client_body/0000067289, client: 1.2.3.4, server: club.orbisius.com, request: “POST /wp-admin/post.php HTTP/1.1”, host: “club.orbisius.com”, referrer: “http://club.orbisius.com/wp-admin/post.php?post=1374&action=edit

I have tried turning the buffering off and/or to reduce the buffers and their sizes but still no effect.

What options do I have? switch to php-fpm ? upgrade to another distribution? anything else?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try increasing nginx’s buffer size in <code>/wp-admin/*</code> by placing the directive in a location block as follows: <pre>location /wp-admin { <br> client_body_buffer_size <em>value</em>; <br>}</pre> <br>See <a href=“http://serverfault.com/questions/511789/nginx-client-request-body-is-buffered-to-a-temporary-file”>http://serverfault.com/questions/511789/nginx-client-request-body-is-buffered-to-a-temporary-file</a>.

Thanks for the reply. <br> <br>I’ve tried inserting it in the nginx.conf file and in vhost’s conf file. <br>Depending on the location of that snippet nginx either shows forbidden or offers the file for download. <br> <br>I used this: <br>client_max_body_size 100m; <br>

I also have the same error occurring to a VPS running NginX with php-fpm this morning. The load is very low as always. I wonder why this occurs out of the blue. My request is a GET one and there is no file upload anywhere near this one.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.