100% cpu usage with wordpress theme customizer suPHP

  • Posted on June 18, 2014
  • ebelusicAsked by ebelusic

i am running the single core 512MB DO droplet and Cent OS 6

i have configured php to use mod_suphp for security reasons. i will be running multiple sites off this box at some point, i want to isolate them all from eachother. the suphp setup went perfectly, i was able to install wordpress and set up the databases, ftp etc.

the issue i am having is that certain actions spike the php-cgi process up to 100% and eventually timeout. the wordpress customizer hangs on save while accessing the admin-ajax.php file.

one of the themes i was using (the X theme) when trying to upload a json file ended up hanging and timing out on line 30 of wp-includes/compat.php

on cpanel servers, i used suphp without any issue, and the same actions and themes work fine. the only difference i notice is that the php process on cpanel machines is “php” whereas mine is “php-cgi”. i have no idea if this is part of the issue, but any help at identifying why and how only certain wordpress scripts are overloading the cpu would be helpful.

an important note is that the site is not under any traffic when this happens, as it is only in development. also there is just over 50% of the RAM used while the CPU is spiking so i am not running out of memory

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

php-cgi is used when you’re using FastCGI rather than mod_php in your httpd config. Basically, this means that when you run a php script it’s calling php-cgi and using httpd worker module rather than the prefork module.

This allows you to thread PHP, but if the cgi script that handles PHP is improperly configured (or you have a resource-intensive plugin), it can shoot your RAM and/or CPU through the roof.

If you’re unsure which one you need, it would most likely work best using the mod_php.