I did some digging and here what I found:
You get more details if you look at your nginx logs. The problem is you won't be able to access them unless you first switch to the root user via
sudo su
You can then access the nginx log under and you will see the error I got below as well:
/var/log/nginx/yoursite.com-error.log
2017/12/26 23:15:15 [error] 15705#15705: *179 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [MY_LOCAL_IP], server: yoursite.com, request: "POST /admin HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "yoursite.com", referrer: "https://prime7pms.com/admin"
The big clue was Connection reset by peer. In order to fix it I had to do the following:
- Click on Edit Nginx Configuration through Forge under the Site Details screen for your site. If you wish to do this via the console it is located here:
etc/nginx/sites-enabled/yoursite.com
I then used the following settings to increase the time-out:
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
client_max_body_size 16M;
}
That is only part of the solution. You will also need to visit /etc/php/7.0/cli/php.ini and change the Resource Limits as follows:
max_execution_time = 300
The final change you will need to make is in /etc/php/7.0/fpm/pool.d/www.conf where you will have to set the following:
request_terminate_timeout=300
After all these changes you will need to bounce PHP and Nginx which you could do through the Forge interface or run the following:
sudo systemctl reload php7.0-fpm.service
sudo systemctl reload nginx.service
Final considerations, I used 300 for my settings which is 5 minutes. I am still using PHP 7.0 on my server, so you may have to update all references to your PHP version.
I hope this helps someone as I was cracking my head for a few hours for a seemingly simple issue!