HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   php-cgi and high cpu (http://www.howtoforge.com/forums/showthread.php?t=49868)

Karasu 5th November 2010 09:22

php-cgi and high cpu
 
Hi,

When I'm execute any web with php in my server, I have very php-cgi proceses and my cpu is a 90-95%. I try reinstall php and apache but it is not a solution in my problem. Anybody help me with this? :mad:

My php version is: PHP 5.2.14

Thanks...

falko 6th November 2010 14:55

Did you enable PHP-CGI or PHP-FastCGI? FastCGI should use less resources than CGI.

Karasu 6th November 2010 15:22

I enabled Fastcgi, my fastcgi.conf is :

Code:

AddHandler    fcgid-script .fcgi
  IPCConnectTimeout 20

And change for :

Code:

AddHandler    fcgid-script .fcgi
  IPCConnectTimeout 60
  IPCCommTimeout 90
  IdleTimeout 21600
  IdleScanInterval 900
  ProcessLifeTime 21600
  MaxProcessCount 128
  MaxRequestsPerProcess 10000
  DefaultMaxClassProcessCount 4
  DefaultMinClassProcessCount 1


But can't resolve the problem, my cpu is a 95-100%

falko 7th November 2010 20:58

Are there any errors related to this in your logs (especially the Apache error log)?

Karasu 13th November 2010 13:20

Yes in my apache error.log:

Code:

[Thu Nov 11 23:07:48 2010] [notice] mod_fcgid: call /var/www/web2.com/web/index.php with wrapper /var/www/php-fcgi-scripts/web10/.php-fcgi-starter
[Thu Nov 13 23:07:50 2010] [notice] mod_fcgid: call /var/www/web1.info/web/index.php with wrapper /var/www/php-fcgi-scripts/web11/.php-fcgi-starter
[Thu Nov 13 23:07:56 2010] [notice] mod_fcgid: call /var/www/web15.org/web/index.php with wrapper /var/www/php-fcgi-scripts/web33/.php-fcgi-starter
[Thu Nov 13 23:07:59 2010] [notice] mod_fcgid: process 5446 going graceful shutdown, sending SIGTERM
[Thu Nov 13 23:12:15 2010] [notice] mod_fcgid: process /var/www/web1.info/web/index.php(5445) exit(communication error), terminated by calling exit(), return code: 0

Are more lines of notice same of this :(

Karasu 18th November 2010 15:09

Can nobody help me?:(

falko 19th November 2010 13:47

What's the output of
Code:

ls -la /var/www/web1.info/web/index.php
? What's in /var/www/web1.info/web/index.php?

Karasu 19th November 2010 18:48

Output of ls -la /var/www/web1.info/web/index.php:

Code:

# ls -la /var/www/web1.info/web/index.php
-rwxrwxrwx 1 755 client2 397 oct 28 11:53 /var/www/web1.info/web/index.php

The output of ls -la /var/www/web2.com/web/index.php

Code:

# ls -la /var/www/web2.com/web/index.php
-rw-r--r-- 1 web16 client1 397 nov 16 01:04 /var/www/web2.com/web/index.php


The index.php are a few simple recently installed wordpress.


All times are GMT +2. The time now is 17:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.