So I have a few WordPress sites running on my VPS (Ubuntu 12.10, Nginx, php-fpm 5.4)

The sites are all on seperate vhosts and use their own config files (albeit similar to each other) and vary in complexity. One is very simple and uses minimal plugins.

When I try to update core on any site via the admin area I click the "Update Now" button (which should run the script in wp-admin/update-core.php the page hangs for a minute or two before going to a blank admin page (i.e. the wp-admin menu bars and header bar are there but there is no content in the body of the page). Visiting another admin page via the still menu bar reveals that the core has not been updated.

Checking the error log I see this entry:

2013/10/29 23:20:48 [error] 9384#0: *5318248 upstream timed out (110: Connection timed out) while reading upstream, client: --.---.--.---, server: www.mysite.com, request: "POST /wp-admin/update-core.php?action=do-core-upgrade HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mysite.com", referrer: "http://mysite.com/wp-admin/update-core.php"

This didn't happen in the past on older updates and the rest of the site including updating plugins works fine.

Any ideas? Could it be as simple as a time-out error? I find that unlikely as the server should munch though a wp upgrade in seconds.

  • Try to strace a PHP upgrade process to find what could be causing the issue, could it be a network related timeout, or there is something else in play. – Tabiko Oct 30 '13 at 10:07
  • I don't think it's network related as the rest of the site works fine and updating plugins works too. How would I trace a php upgrade process? – harryg Oct 30 '13 at 11:07

WordPress update is a slow process.


request_terminate_timeout = 300s

to your www.conf

You need to increase fastcgi read timeout in your nginx vhost file

fastcgi_read_timeout 300s

Also, check your execution time in php ini, or redefine it in www.conf for php-fpm

php_admin_value[execution_time] = 300
  • Can we clarify which www.conf we are talking about. I am still confused as to what config files apply to what. I thought nginx.conf is Nginx's and php-fpm's is called php-fpm.conf... – harryg Nov 3 '13 at 15:07
  • OK I increased the timeout in the vhost config file, went to update and it updated in about 2 seconds. Very strange, but it works! – harryg Nov 3 '13 at 15:19

Two things you'd want to check with WP updates from my experience.

  • network problems, do a netstat on server to see if there are some connections from php process that is updating and an external server. some servers are slower than others.
  • limited number of php-fpm workers, I've seen WP updates calling themselves via HTTP so it locks all available workers.


  • php-fpm's slowlog
  • higher nginx's side timeout on fastcgi
  • strace is the best thing next to nutella. use it.
  • I'm having trouble with the slowlog. When I edit /etc/php5/fpm/pool.d/www.conf and uncomment the slowlog lines I get a 502 bad gateway error – harryg Oct 31 '13 at 14:02

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.