PDA

View Full Version : php5-cgi takes loads of load (max execution time?)



dwm
12-22-2007, 05:45 AM
Since i have installed php5 as CGI with suPHP one website doesnt load anymore in the browser, and the processes keep on running with big load. Anyone knows how to kill php-cgi after 30 seconds for example? It IS set in the php.ini ..


1022 31597 76.9 0.3 17920 7172 ? R 00:17 614:24 /usr/local/php5/bin/php-cgi
1022 32184 79.9 0.3 17924 7192 ? R 01:08 598:37 /usr/local/php5/bin/php-cgi
1022 5669 41.4 0.3 17924 7180 ? R 08:05 137:14 /usr/local/php5/bin/php-cgi
1022 6537 32.3 0.3 17924 7176 ? R 10:19 63:52 /usr/local/php5/bin/php-cgi
1022 6783 30.3 0.3 17928 7172 ? R 10:45 52:01 /usr/local/php5/bin/php-cgi
1022 7283 29.3 0.3 17924 7176 ? R 11:33 36:07 /usr/local/php5/bin/php-cgi
1022 7788 24.9 0.3 17920 7172 ? R 12:10 21:25 /usr/local/php5/bin/php-cgi
1022 8112 24.3 0.3 17924 7196 ? R 12:44 12:48 /usr/local/php5/bin/php-cgi
1022 8686 22.7 0.3 17920 7172 ? R 13:35 0:21 /usr/local/php5/bin/php-cgi

dwm
12-27-2007, 04:24 AM
#pico /etc/cron.hourly/php5cgi-restart

// Type:
#!/bin/sh
/usr/bin/killall -HUP php-cgi
exit;

// Save and exit and:
# chmod +x /etc/cron.hourly/php5cgi-restart


is a temporary workaround (every hour for example) using cronjobs/crontab.

Does no-one knows why this is happening? I also notice that sometimes the apache returns a timeout, but then the php-cgi is still running.

neorder
01-06-2008, 09:57 PM
Sori, i don't know about your issue, but i just wanna know is it necessarily that fast-cgi is really faster than mod_php?

also i wonder if it's really a need to do suPHP, what advantages does suPHP offer?

skaag
04-02-2008, 01:03 PM
Hey DWM did you find a solution to this problem? I am experiencing a similar thing now. Apache + fastcgi works at first, but after a few hours it looks like apache is not responsive at all, or perhaps can no longer communicate to php-cgi, the server load drops drastically (no usage), and customers are angry ;-)

Skaag

PGP
11-15-2008, 04:15 PM
Have the same problem =((
Can anybody advise where to dig?
http://hosting.ruip.ru - here is my php.ini
max_execution_time is SET =(
But i tried to execute a php script with infinity cycle... And for now it executing already 22 minutes!! =(
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
7076 h1019 1 118 0 56560K 21272K CPU1 1 22:33 100.00% php-cgi

jackc
11-15-2008, 09:16 PM
Sori, i don't know about your issue, but i just wanna know is it necessarily that fast-cgi is really faster than mod_php?

also i wonder if it's really a need to do suPHP, what advantages does suPHP offer?

it's slower and use more resource than mod_php.

the only advantages are more secure and maybe easier to track down an abuse user.

PGP
11-17-2008, 03:47 AM
So, no ideas for now with this problem? =( Maybe i have to recompile PHP at all? =((