Optmizing Apache and php-cgi for CPU Usage

Discussion in 'Server Operation' started by alleks, Apr 2, 2013.

  1. alleks

    alleks Member

    I'm having a huge problem with a server where I run 2 wp blogs.

    The problem is that sometimes my cpu goes sky rocking high, and just don't know what else todo. I've configured APC, huge difference, reduced Timeouts on Apache and MySQL tuning, but now I have to find a method to optimize the CPU usage.

    And some times this is the output I get in the error log files for the sites:
    Code:
     mod_fcgid: can't apply process slot for /var/www/php-fcg
    i-scripts/web2/.php-fcgi-starter
    and this in my apache2/error.log file

    Code:
    [error] mod_fcgid: process /var/www/php-fcgi-scripts/web2/.php-fcgi-starter(31462) exit(communication error), get unexpected signal 7
    
    So, what do you recommend me to try and lower my cpu usage and keep serving content to users. I have a VPS from 1and1 (I kinda repent know for the decision) with 1cpu and 2gb ram, and planning to get another cpu... but I don't like the way they changed the prices.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Use PHP-FPM in ondemand mode instead of FastCGI.
     
  3. alleks

    alleks Member

  4. falko

    falko Super Moderator Howtoforge Staff

  5. alleks

    alleks Member

Share This Page