lately ive been noticing that my computer has been grinding to a halt at times and after inspecting my system processes, it showed there was more than 10 instances of php4.exe running
The problem with this is, when i do net stop apache, they all clear, and then seemingly at random intervals i will check back and there will be more instances of it running without me even viewing the site, therefore PHP should not of started a process.
I have given my localhost IP to one client but i doubt very much he is connecting that often, also, why would it create 15+ instances of php4.exe???
could it be an error in my coding, with a system memory leak? is this even possible with PHP? (i highly doubt it)
as a side note, at first i thought it was the zend studio internal debugger causing it all but this has become less and less likely to be the case.
Any ideas?
could be a stupid question..
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
if there are many processes running, restart, see if there are any (shouldn't be), surf around on it, see if they've come back. I'd guess there is some script not terminating (infinite or very long timeout).
as far as I know PHP is only running while it is processing a script, other than that it is not executed, so it really should be something happening (bot or something scanning your site could trigger this too).
as far as I know PHP is only running while it is processing a script, other than that it is not executed, so it really should be something happening (bot or something scanning your site could trigger this too).
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
hmmmm, not sure on the bots idea, not sure how they'd of got hold of my site seeings as its a direct IP connection (http://34.54352.4542 etc) and if i had 15 bots crawling my site id be a very happy man!
also there are no cron jobs so nothing should be starting up by itself
also there are no cron jobs so nothing should be starting up by itself
- artexercise
- Forum Commoner
- Posts: 33
- Joined: Thu Nov 20, 2003 9:38 am
- Location: Raleigh, NC
Syranide is right. If some page is getting caught in an infinite loop then the process will stay open and active. I have about 50+ people that can get my local server here and every now and then this happens. Very rarely is IS my coding, but the principle culprit I had found was a connection problem across servers.Syranide wrote:if there are many processes running, restart, see if there are any (shouldn't be), surf around on it, see if they've come back. I'd guess there is some script not terminating (infinite or very long timeout).
as far as I know PHP is only running while it is processing a script, other than that it is not executed, so it really should be something happening (bot or something scanning your site could trigger this too).
I had several instances in which I used another server as an email server and I also had to connect to a printer server. In both cases if the server was down this caused the system to pause long enough to make the end user hit the refresh button several times. After several people did this, the php server would come crashing to a halt and I'd have up to 30 instances of php running.
Since then I'm reduced script running time and removed the printer server from the loop. So if your end user is getting frustrated at a slow page load and hitting refresh often, then it could be another cause.