I have a site with Codeigniter running on Ubuntu with Nginx and PHP-FPM. It worked fine until the last night, when it started loading pages very slowly, sometimes giving 504, and sometimes quickly loading pages.
If I restart nginx or php-fpm, the site works fine for 20-30 seconds, then the problem will recur.
Here is what the nginx error log says:
[error] 25226 # 25226: * 65 timeout up (110: connection time out) when reading the response header upstream, client: XXXX, server: www.mydomain.ext, request: "GET / HTTP / 1.1", upstream: "fastcgi: // unix: /var/run/php/php5.6-fpm.sock:", host: "Www.mydomain.ext"
For the past few hours, I have been searching the Internet and playing with nginx and php-fpm config, but I could not solve it.
Does anyone know how to help me?
source
share