Nayara
By:
Nayara

Error log: upstream timed out (110: Connection timed out) on Nginx

September 30, 2015 1.8k views
Nginx PHP Ubuntu

Please... I need help!!! My script don't works! My script in php only load for serveral time and afterwords appears that message:

An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

In /var/log/nginx/nginx_error.log show me that error:

[error] 2019#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: localhost, request: "GET /sistema-10-reais/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "x.x.x.x.x"
root@zash:/var/log/nginx#

when is x.x.x.x is IP.

I am using nginx on ubuntu 14.04.

1 Answer

PHP-FPM is used by Nginx to execute PHP files. That error message is saying that the unix socket file used for communication between them doesn't exist. The first step in debugging this would be to check on the FPM processes by running:

  • sudo service php5-fpm status

If the process has crashed for some reason, the error log may include messages that can point towards the cause of the problem. You can view them by running:

  • less /var/log/php5-fpm.log

If needed, you can restart the process using:

  • sudo service php5-fpm restart
Have another answer? Share your knowledge.