The server keeps creating processes using my PHP script

I am running a PHP script on a shared hosting server (hostgator). PHP script is written using a framework codeigniter

. Hostgator Shared host server only allows you to run 25 processes. I don't know why my script keeps creating a 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%

      

CUP usage is almost 0% and memory usage is only 0.1-0.3%

Is it because of bad code?

Or any idea why this process continues to be created? I know it will be difficult to tell without seeing my code, but I would like some general approach to make it easier for me.


Yes, I just asked for server support and they said they were using fastcgi. But the point is that they only allow 25 processes at most. Whenever it reaches 25 processes, I get an internal server when browsing. And it's very easy to get 25 processes. So how can I do this? Can I do something on my scripted site? I have run other scripts that are not mine, like the phpbb forum, but these processes do not appear in processes. Please kindly suggest me. Thank.

+2


source to share


2 answers


Perhaps PHP scripts are executed with fastcgi . I believe that using this web server will keep PHP processes running between reuse requests, which is more efficient than starting a new one every time.



+1


source


This is pretty unusual. Do you know the exact moment when these processes were created? Also, you should check your code to ignore _user_

abort () function
and your php.ini to ignore _user_

abort parameter
.



0


source







All Articles