August 18, 2011

Nginx: Upstream timed out on WordPress Automatic Update

After a WordPress update, you may experience a timeout for automatic wordpress updates.

[error] 29038#0: *29 upstream timed out (110: Connection tim
ed out) while reading upstream, client: x.x.x.x, server: server.com, reque
st: "POST /wp-admin/update-core.php?action=do-core-upgrade HTTP/1.1", upstream:
"fastcgi://127.0.0.1:9000", host: "server.com", referrer: "http://server.com/wp-ad
min/update-core.php"

Why?

The timeout occurs due to a permissions issue in which the http user cannot write to the upgrade directory and download the update.

How do you fix it?

To resolve this, you need to modify permissions of the wp-content folder and ensure your http user (nginx) has ownership of the entire html directory.

chmod -R 755 /usr/share/nginx/html/wp-content
chown -R nginx /usr/share/nginx/html

Leave a Reply