Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a server running on a Linode with Ubuntu 10.04 LTS, Nginx 0.7.65, MySQL 5.1.41 and PHP 5.3.2 with PHP-FPM.

There is a WordPress blog on it, updated to WordPress 3.2.1 recently.

I have made no changes to the server (except updating WordPress) and while it was running fine, a couple of days ago I started having downtimes.

I tried to solve the problem, and checking the error_log I saw many timeouts and messages that seemed to be related to timeouts. The server is currently logging this kind of errors:

2011/07/14 10:37:35 [warn] 2539#0: *104 an upstream response is buffered to a temporary file /var/lib/nginx/fastcgi/2/00/0000000002 while reading upstream, client:, server: www.mydomain.com, request: "GET /page/2/ HTTP/1.0", upstream: "fastcgi://", host: "www.mydomain.com", referrer: "http://www.mydomain.com/"

2011/07/14 10:40:24 [error] 2539#0: *231 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: www.mydomain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://", host: "www.mydomain.com", referrer: "http://www.google.es/search?sourceid=chrome&ie=UTF-8&q=mydomain"

and even saw this previous serverfault discussion with a possible solution: to edit /etc/php/etc/php-fpm.conf and change


instead of

;request_terminate_timeout= 0

The server worked for some hours, and then broke again. I edited the file again to leave it as it was, and restarted again php-fpm (service php-fpm restart) but no luck: the server worked for a few minutes and back to the problem over and over. The strange thing is, although the services are running, htop shows there is no CPU load (see image) and I really don't know how to solve the problem.

The config files are on pastebin

The php-fpm.conf file is here

The /etc/nginx/nginx.conf is here

The /etc/nginx/sites-available/www.mydomain.com is here

Please help :(

share|improve this question

1 Answer 1

Have you tried instead of "upstream" -ing in nginx.conf doing something like:

# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
   try_files       $uri /index.php;
   fastcgi_index   index.php;
   include         fastcgi_params;
   fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
   fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;

Take a look here http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/

share|improve this answer
Thanks for the tip adrian7, at that time the problem was solved thanks to the hosting provider tips. I will remember your point -don't know if it would work, everything is fine now-, maybe it could be useful on future situations similar to this. Regards! –  javipas May 14 '12 at 9:24
What was the "hosting provider tips" ? –  Daniel T. Magnusson Jun 18 '12 at 9:36
I'm affraid I don't remember :( In fact, that server no longer exists. Sometime ago I moved everything from there to another VPS. Sorry! –  javipas Jul 11 '12 at 15:33
@adrian7 Your suggestion is absolutely useless, as there's no difference between fastcgi_pass; and upstream backend { server; } fastcgi_pass backend;. –  VBart Jul 23 '12 at 2:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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