nginx keeps buffering POST requests

April 21, 2014 8.4k views
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:, server:, request: "POST /wp-admin/post.php HTTP/1.1", host: "", referrer: "" 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?
2 Answers
Try increasing nginx's buffer size in /wp-admin/* by placing the directive in a location block as follows:
location /wp-admin {

client_body_buffer_size value;

Thanks for the reply.

I've tried inserting it in the nginx.conf file and in vhost's conf file.
Depending on the location of that snippet nginx either shows forbidden or offers the file for download.

I used this:
client_max_body_size 100m;
Have another answer? Share your knowledge.