Has anybody else ran into scaling problems like this? Queue workers were also located on this box, would that have the potential to drive the CPU so high?
Any advice is appreciated for optimization.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone,
I have recently redesigned one of my legacy CodeIgniter systems running on PHP 5 to run on Laravel 5.3 and PHP 7.1. At any given time, about 60-110 users are online at a single time. This is not a realtime app; it’s just a normal load-a-page-and-serve app with some AJAX requests here and there.
Here was my CodeIgniter + PHP 5 DigitalOcean droplet specs:
Web: 2 GB RAM + 2 CPU
Dedicated MySQL: 2 GB RAM + 2 CPU
My CodeIgniter + PHP 5 DigitalOcean Apache 2 configuration was:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 50
</IfModule>
Rarely do my load averages ever spike above 1 on either my web or dedicated DB server.
When I switched DNS to begin serving my new Laravel app with Laravel Forge, here were my server specs:
Web: 8 GB RAM + 4 CPU
Dedicated MySQL: 4 GB RAM + 2 CPU
php-fpm.conf for web was:
listen = /run/php/php7.1-fpm.sock
pm = dynamic
pm.max_children = 1024
pm.start_servers = 300
pm.min_spare_servers = 100
pm.max_spare_servers = 300
pm.max_requests = 1024
And php-fpm spectacularly failed and generated tons of "www pool seems busy (consider increasing pm.start_servers)" errors, alongside of a 100-400 load average (all three numbers) and near 100% CPU utilization constantly. It used only about only 50-70% RAM usage (about 5-6GB of 8GB on the new web machine) and no matter how much I increased these numbers, php-fpm still couldn’t handle it. The site was virtually not loading with our average user load of 60-110 and I had to redirect the traffic back to our old servers and app with CodeIgniter and abort the transition.
MySQL load stayed under 1 the entire time. It was the web server that was overwhelmed.
Can anybody explain to me why, with twice the amount of hardware as my current setup, nginx and php-fpm failed so badly? What am I missing here?
Please or to participate in this conversation.