I am having connection timed out and connection reset by peer error 503 on Nginx + Phpfpm 7.1 setup.
2018/06/28 14:32:13 [error] 2428#2428: *45 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.10.1, server: , request: "GET /phpmyadmin/db_structure.php?server=1&db=britam HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock", host: "192.168.10.192"
2018/06/28 14:39:01 [error] 2428#2428: *51 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.10.1, server: , request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "192.168.10.192"
2018/06/28 14:41:01 [error] 2428#2428: *56 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.10.1, server: , request: "GET /phpmyadmin/db_structure.php?server=1&db=britam&ajax_request=true&ajax_page_request=true&_nocache=1530196749597737784&token=yYGJ2q%2FE_%2BD6v!Wg HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "192.168.10.192"
I know I have already Googled my heart out and applied all sorts of suggestions such as setting request_terminate_timeout=30s or more in /etc/php/7.1/fpm/pool.d/www.conf and setting max_execution_time = 30 in /etc/php/7.1/fpm/php.ini and finally fastcgi_read_timeout 300; in servers section in nginx configs, then and restarting both Nginx and Phpfpm services. None of all these options has worked.
Here's my Nginx config;
server {
listen 80 default_server;
access_log /var/log/nginx/phpmyadmin_access.log;
error_log /var/log/nginx/phpmyadmin_error.log;
# Main application:
root /var/www/html;
index index.php index.html index.htm;
# phpMyAdmin:
location /phpmyadmin {
root /usr/share;
index index.php;
}
# PHP files for phpMyAdmin:
location ~ ^/phpmyadmin(.+\.php)$ {
root /usr/share;
index index.php;
#fastcgi_read_timeout 300;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
# PHP files for the main application:
location ~ \.php$ {
fastcgi_read_timeout 300;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
}