Hello,
I am having a problem related to a PHP system that is running through a Windows Service.
The application works as follows:
So far so good, my script works, but I've noticed that even after the script finishes, the PHP.exe*32
and conhost
process of the windows command window still continues to run in the task manager. And over time these processes are piling up until there are 800 or more php.exe
processes that are doing absolutely nothing but consume memory.
Here's what I've tried
- I have tried to put
exit(0)
ordie()
at the end of the scripts to see if it killed the process - I tried to change my windows service by looking at
Process.Kill()
ofSystem.Diagnostics
- I tried to change the PHP execution parameters on the server by setting
max-execution-time
to 60s
None of the options have any effect, however I realize that this happens in certain processes, I have 3 services of these, each one running a different file and apparently only 1 of them has this problem.
I would like to know what logic PHP performs to kill these processes or how I can force the script to kill its own process at the end of execution so that there is no stack of processes running.
I'm using CodeIgniter in PHP scripts.