Page 1 of 1

php and top processes

Posted: Mon Dec 08, 2008 8:45 am
by firat001
I am having trouble with server. on running top processes there are too many lines like :


** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../index.php
** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../other.php
** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../other2.php

Because of it , system using swap and in a few minutes it crashes.

When server crashed, error log message is "server reached max client..." So I changed the server limit but still having problem.

is there a configuration problem about apache or something else? is it normal seeing php on top processes instead of httpd?

thanks for help.

Re: php and top processes

Posted: Mon Dec 08, 2008 10:12 am
by SteveC
firat001 wrote:I am having trouble with server. on running top processes there are too many lines like :


** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../index.php
** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../other.php
** user 18 0 18888 8020 4064 R 1.0 0.3 0:00.03 /usr/bin/php /home/..../other2.php

Because of it , system using swap and in a few minutes it crashes.

When server crashed, error log message is "server reached max client..." So I changed the server limit but still having problem.

is there a configuration problem about apache or something else? is it normal seeing php on top processes instead of httpd?

thanks for help.
That's weird. How long does the average script take to process? If it's using the swap file, perhaps you need to optimise your scripts to use less memory? Increasing the maximum number of clients is a bad idea, if you're running out of memory then you want to reduce the maximum number of clients as to allow the server to run efficiently. Overloading it definitely won't help.

Re: php and top processes

Posted: Mon Dec 08, 2008 1:30 pm
by firat001
these php processes takes avg 0.06 and httpd processes takes avg 0.40 .

Re: php and top processes

Posted: Mon Dec 08, 2008 8:20 pm
by SteveC
firat001 wrote:these php processes takes avg 0.06 and httpd processes takes avg 0.40 .
Do you know how much memory each process is using?

Re: php and top processes

Posted: Mon Dec 08, 2008 8:21 pm
by SteveC
I hadn't noticed what you had said previously.

If you're seeing php.exe running as a process, that usually means you're using the CGI - it's normal to see it as its own process.

Re: php and top processes

Posted: Tue Dec 09, 2008 3:37 am
by firat001
thanks but why it causes to lock server. a security problem ?