By MSV
We had to restart nginx and php7.0-fpm on our droplet (Ubuntu 16.04) because it was throwing back 502 errors on all our sites. Now the sites are running slowly. When I restart the services again, they speed up briefly, only to slow down again. There isn’t an unusually high load on the droplet, and checking top doesn’t show any rogue processes.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @MSV,
I could suggest checking a few things:
- sudo tail -f /var/log/nginx/access.log
- sudo netstat -plant
htopFeel free to share the output of the commands here as well.
I believe that you might be hitting your worker connections limit for your Nginx webserver or the max requests for PHP FPM. You might have to tweak your Nginx and PHP FPM configuration files in order to increase that accordingly.
Regards, Bobby
If you are reaching the limit, I’ll recommend raising your max_children as well rather than just your max_requests.
The important settings is your max_children and it’s number. Basically, Max_children refers to the maximum number of concurrent PHP-FPM processes allowed to exist in such a pool. If the volume of incoming requests requires the creation of more PHP-FPM processes than the number allowed by the max_children limit, those additional requests are backlogged in a queue to await service.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.