ispCP - Board - Support
[SOLVED] php5-cgi causes abnormally high cpu-load - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: [SOLVED] php5-cgi causes abnormally high cpu-load (/thread-2234.html)

Pages: 1 2


RE: php5-cgi causes abnormally high cpu-load - joximu - 01-26-2008 01:04 AM

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


RE: php5-cgi causes abnormally high cpu-load - psygarden - 01-26-2008 03:25 AM

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...


RE: php5-cgi causes abnormally high cpu-load - psygarden - 01-26-2008 03:49 AM

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?


RE: php5-cgi causes abnormally high cpu-load - joximu - 01-26-2008 06:39 AM

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


RE: php5-cgi causes abnormally high cpu-load - psygarden - 01-28-2008 12:21 AM

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-load-on-ispcp-server-t-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