views:

133

answers:

3

Hello all,

I am running a php script on a shared hosting server (hostgator). That PHP script is written with the codeigniter framework. Hostgator Shared hosting server only allows 25 processes to run. I have no idea why my script keeps creating the process on the server. The cpanel process server log looks like this:

2221 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

30577 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

30343 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

29994 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

32278 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

28528 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.1% Kill Process

27757 /usr/bin/php /home/megain/public_html/megainfine/index.php 0% 0.2%

The CUP Usage is almost 0% and Memory usage is only between 0.1-0.3%

Is this because of bad code?

Or, any idea why this process keeps getting created? I know that it will be hard to say without seeing my code, but I would like some general approach that will make the problem easier for me to trace.

+1  A: 

It might be that PHP scripts are run using fastcgi. I believe when using this the web server will keep PHP processes running between requests for re-use, which is more efficient than starting a new one each time.

Tom Haigh
A: 

Yes, I just asked the server support and they said they are using fastcgi. But the fact is that, they only allow 25 process maximum. Whenever it reach 25 process, I got internal server when browsing. And it very easily to got 25 process. So how can i do ? Can i do something from my scripting site ? I have run other scripts which is not mine like phpbb forum, but those processes are not appear in the processes. Please kindly suggest me. Thank you.

@megainfinity: It is better to add updates to your question as an edit to the original, rather than an answer (unless it is actually an answer).
Tom Haigh
oops sorry about that. How can i remove ? :(
A: 

This is rather unusual. Do you know the exact moment when these processes are created? Also, you should check your code for ignore_user_abort() function and your php.ini for ignore_user_abort setting.

n1313