I've got PHP 5.3.3 and nginx 0.8.47 compiled from source running a Wordpress blog. The RSS feed generated by Wordpress was getting truncated at roughly 16k (including header was 16k+90b). By adding the following to my nginx config:

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

the problem went away.. However, from what I read on the Nginx wiki page the buffers only determine when buffering will overflow onto disk. There is nothing that indicates the response can be truncated due to the buffers being too small..

So my question is, why was the response being truncated before changing this setting? It seems the request should not have been truncated, just a little slower due to disk buffering.

Additional info:

  • Ubuntu 10.04.2 32bit
  • 3
    Are you sure that your fastcgi_temp_path is writable by the nginx process ?
    – Ochoto
    Aug 2 '11 at 21:54

The accepted answer is useless, so I went with the comment about checking write permissions, which did the trick for me. I'm running Nginx as a different user than default, so permissions had to be changed on the default temp path. For RHEL installs this is /var/lib/nginx/tmp/fastcgi and it has default permissions of 700:

chown -R webuser /var/lib/nginx/tmp

I ran into this problem on Scientific Linux 7, using the package from the SL repos. This step was not necessary for me on Scientific Linux 6 using the Nginx-provided package, which has 755 permissions on /var/cache/nginx


At first try to see error_log (at level info, if nothing relevant printed at info level, try to read debug log).


Copy this text in your conf file of nginx

http {

        fastcgi_buffers 256 4k;

After restart nginx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.