Current time: 11-15-2024, 03:50 AM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] php5-cgi causes abnormally high cpu-load
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #11
RE: php5-cgi causes abnormally high cpu-load
Maybe there are some "bad scripts" which prevent php-cgi from terminating in a proper way...

Strange: on your graph there is no sign on three o clock (backup)...

Only some php-cgi processes do consume much cpu?
Maybe you can enable apache server-status to see more information (what apache is doing right now...)

/J
01-26-2008 01:04 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #12
RE: php5-cgi causes abnormally high cpu-load
All the scripts that i've got running on my server have been running for over a year on the old server, without going offline once... so i doubt there are any major errors there...

the old server didn't have fast-cgi installed though...

I have a lot of this stuff in my /var/logs/apache2/error.log:

Quote:[Fri Jan 25 18:18:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (pid 21289) termination signaled
[Fri Jan 25 18:18:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/e107.be/php5-fcgi-starter" (pid 8606) terminated by calling exit with status '0'
[Fri Jan 25 18:18:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (pid 21289) terminated by calling exit with status '0'
[Fri Jan 25 18:18:17 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (uid 2002, gid 2002) restarted (pid 13260)
[Fri Jan 25 18:20:06 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/e107.be/php5-fcgi-starter" (uid 2005, gid 2005) restarted (pid 13347)
[Fri Jan 25 18:23:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/e107.be/php5-fcgi-starter" (pid 13347) termination signaled
[Fri Jan 25 18:23:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (pid 13260) termination signaled
[Fri Jan 25 18:23:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/e107.be/php5-fcgi-starter" (pid 13347) terminated by calling exit with status '0'
[Fri Jan 25 18:23:11 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (pid 13260) terminated by calling exit with status '0'
[Fri Jan 25 18:23:15 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psygarden.be/php5-fcgi-starter" (uid 2002, gid 2002) restarted (pid 4594)

that doesn't look very good...

I'm starting to wonder... is there a way to install ispCP without using FastCGI ? I never had it on my servers before and it doesn't seem to be very practical... :/

my server even went offline completely as a result of it...
(This post was last modified: 01-26-2008 03:32 AM by psygarden.)
01-26-2008 03:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #13
RE: php5-cgi causes abnormally high cpu-load
I disabled cgi for all the domains that i have up and running using the admin panel and now the cpu usage is a lot lower (1-4% instead of 160% -dualcore)

but... the sites are a lot slower...

should i enable more static php5 sessions?
01-26-2008 03:49 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #14
RE: php5-cgi causes abnormally high cpu-load
There are some descriptions of the difference in this forum

apache mpm worker + php-fastcgi
or
apache mpm prefork + mod_php

the first is faster (apache) and much more secure (php fastcgi) but has some drawbacks with the settings on some systems (see other threads)
the latter is the well known version which we used for years but which ist not that performant (apache) and not secure (mod_php) because all php apps are running with the same user (the apache user). For a hosting company this shouldn't be an option anymore... (you also have the problems with ftp-user vs apache user in some apps/settings/permissions).
apache mpm worker is not supported with mod_php - just to conclude this...

/J
01-26-2008 06:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #15
RE: php5-cgi causes abnormally high cpu-load
joximu Wrote:There are some descriptions of the difference in this forum

apache mpm worker + php-fastcgi
or
apache mpm prefork + mod_php

the first is faster (apache) and much more secure (php fastcgi) but has some drawbacks with the settings on some systems (see other threads)
the latter is the well known version which we used for years but which ist not that performant (apache) and not secure (mod_php) because all php apps are running with the same user (the apache user). For a hosting company this shouldn't be an option anymore... (you also have the problems with ftp-user vs apache user in some apps/settings/permissions).
apache mpm worker is not supported with mod_php - just to conclude this...

/J

Actually i found a solution to my issue, i posted the how-to in my last post in this thread: http://www.isp-control.net/forum/high-lo...-1103.html

Essentially, it's all about upgrading your php to 5.2.2 or higher . i upgraded to 5.2.5 and i haven't had these issues since!

greetings,
Rik
01-28-2008 12:21 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)