-2

i am running the single core 512MB DO(digital ocean) 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

Erik
  • 644
  • 1
  • 5
  • 13
  • It might just be me, but I find this physically difficult to read. Consider adding capital letters at the beginning of sentences and some paragraph breaks. – Mark Amery Jun 18 '14 at 19:25

1 Answers1

1

SuPHP processes the file every single time it is called, due to this, it causes a lot of CPU usage. SuPHP just in general uses a lot of CPU, adding WordPress to the mix just makes the CPU usage even more. I recommend using FastCGI as your PHP handler as it uses a low amount of CPU but a high amount of memory. In addition you will be able to use OPCode caching such as APC or memcached, causing WordPress to be significantly faster. In regards to your security concern, FastCGI has the same security as SuPHP and you can upload things no problem. One small thing to note though is your going to need to tweak the settings quite a bit before you get it right, there will be errors at first possibly, the answers to all of which you can get courtesy of Google. Also, I am not sure how DO operates but if you need to fix permissions and have Cpanel, here is a nice article: http://boomshadow.net/tech/fixes/fixperms-script/

Demosthenes
  • 364
  • 2
  • 14
  • my DO box is NOT running cpanel. its just vanilla lamp. i will try the fastcgi. is fast cgi the same as php-fpm? someone from DO recommended php-fpm – Erik Jun 18 '14 at 17:12
  • 1
    php-fpm is PHP FastCGI Process Manager, if you can set it up I suggest it. Again it's more complex then SuPHP and even more complex then FastCGI. If you can do it though and are able to figure out how to set it up, you should. It isn't drop in like SuPHP, it is going to require tweaking. – Demosthenes Jun 18 '14 at 17:16