In certain conditions, a CMS brings my server on its knees (0% CPU left while the server load is never above 20% usually, officially from mysqld, tons of wait and tml in mysql, mysql's slow log exploding with tmp allocations, etc). This is a well-known case for this CMS, based on the combination of these events :
- hundreds of visitors browsing the site at the same time
- database counting hundreds of thousands of items
- php wrapper : SuPHP (fcgid)
The discussion forums of this CMS (called Piwigo) know of the issue, but the only answer that is given is "switch to NginX with Php-fpm". Let's multiply by 100 the number of images and of visitors, if it's NginX instead of Apache+SuPHP, the issue is still absent.
Problem is, I can't switch a whole server to NginX with a snap of my fingers, it's not just about my own websites and - no shame in admitting it - I have no competences yet with NginX. I must keep production websites online, up and running, so my server must stay using Apache.
With that in mind, please, do you see a way out of this issue ? Some way of "cheating" and allowing suPHP to rock again in this precise situation ? If it's at the cost of swallowing 10+ GB of RAM, hey, sure, why not, my server uses only a third of its 32 GB of RAM, and even with the rest for caching the disk usage is calm. If it's at the cost of doubling the CPU charge, haha, once again, sure, that would be OK.
If you have suggestions, I'm all ears, really !
Details about my server : Debian Wheezy, Apache2, PHP Version 5.4.4-14+deb7u14, Php running as SuPHP (fcgid), Mysql 5.5.38 and, honestly, a monstruously powerful dedicated server, AMD Opteron 4334, 32 GB fast RAM, two SSDs Raid-1 disks for / and two Raid-1 Sata disks for /home. Panel : webmin + virtualmin. The panel allows to switch a virtual domain ( = 1 website, with its own user) to Php-CGI or Mod-PHP. Mysql configuration is non-guilty (countless mysql-tuner, tuning-primer), already gradually configured to allow sucking up tons of RAM and caching as if there were no tomorrow.
If you have suggestions for a solution that won't need NginX, I'll be most grateful ! :)