View previous topic :: View next topic |
Author |
Message |
abyssisthebest -
Joined: 30 Jun 2005 Posts: 319 Location: Boston, UK
|
Posted: Thu Mar 23, 2006 11:15 pm Post subject: php.exe processes do not terminate |
|
|
Hi,
Since i have upgraded to 2.3.0.5 the php.exe processes do not end after the script has finished loding.
Has anybody got any ideas?
Edit: This only happens when using FastCGI _________________ My online Portfolio |
|
Back to top |
|
|
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Thu Mar 23, 2006 11:51 pm Post subject: |
|
|
Are you suggesting this isn't the desired behaviour?
That's what FastCGI does. If you don't want it/them there then don't use it. _________________
|
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Thu Mar 23, 2006 11:56 pm Post subject: |
|
|
Its the whole point of fastCGI. The process stays loaded so it can be quickly assigned another task when needed. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Mar 24, 2006 12:25 am Post subject: |
|
|
Let's say your FastCGI Processes Timeout is at 240 seconds (4 mins). When
a user requests the PHP application on the web server, the php.exe won't be
able to exit untill the FastCGI Processes Timeout expires.
Note: Each time the PHP page is requested, the FastCGI Processes timeout
will restart back to the beginning. So if you set this to a higher value, which
I set mine for 300 seconds (5 mins), it probably won't exit.
Edit: I changed it to 5 mins, the reason is because setting it to a higher
value is not a really good idea.
Note: The new native ASP.NET support uses this FastCGI timeout the
exact same way. You can test it for yourself and see. So it's good for
your ASP.NET pages, to keep the timeout at a high value.
Hopefully this answer's your question.
Sincerely, TRUSTpunk
Last edited by TRUSTAbyss on Fri Mar 24, 2006 6:31 pm; edited 2 times in total |
|
Back to top |
|
|
abyssisthebest -
Joined: 30 Jun 2005 Posts: 319 Location: Boston, UK
|
Posted: Fri Mar 24, 2006 8:43 am Post subject: |
|
|
oh, its just that i had 4o php.exe processes running _________________ My online Portfolio |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Mar 24, 2006 11:19 am Post subject: Re: php.exe processes do not terminate |
|
|
abyssisthebest wrote: | Hi,
Since i have upgraded to 2.3.0.5 the php.exe processes do not end after the script has finished loding.
Has anybody got any ideas?
Edit: This only happens when using FastCGI |
We confirm that this is how FastCGI works. For your first PHP page, Abyss Web Server will launch PHP. It sends the request to it, and waits for the results. When PHP generates the page it sends it back to Abyss, and remains active. Let's say that after 5 seconds, another PHP page is to be displayed, Abyss knows that there is already 1 PHP process active, it will send the request to it immediately.
Note that each PHP process can handle a single request at a time. So if 2 or more PHP pages are to be generated in the same time, Abyss Web Server will launch enough PHP processes to handle all of them. PHP processes that are not used for a certain period of time (FastCGI timeout) are stopped. This way of doing things is ideal to accomodate traffic spikes: Abyss will handle the temporary load by creating more FastCGI processes. As the traffic slows, FastCGI processes are stopped one by one. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
abyssisthebest -
Joined: 30 Jun 2005 Posts: 319 Location: Boston, UK
|
Posted: Fri Mar 24, 2006 4:13 pm Post subject: |
|
|
thanks,
It was jsut worrying me that there were 50 or so PHP.exe processes running. _________________ My online Portfolio |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
Posted: Fri Mar 24, 2006 4:21 pm Post subject: |
|
|
abyssisthebest wrote: | thanks,
It was jsut worrying me that there were 50 or so PHP.exe processes running. |
Having 50 php processes running suggests that your FastCGI timeout is set to a very high value. There is no point to set it to more than a few minutes (120-300 seconds). If the timeout value is high, and if you get a traffic spike, php processes will be created to sustain the temporary high load but will remain there for a long time (because the timeout is very long).
TrustPunk's suggestion to set the value to 86400 seconds (1 day) is also a bad practice. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
abyssisthebest -
Joined: 30 Jun 2005 Posts: 319 Location: Boston, UK
|
Posted: Fri Mar 24, 2006 4:37 pm Post subject: |
|
|
I have changed the value and exited all of the php processes, ill keep an eye on them and let you knwo how i get on _________________ My online Portfolio |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Mar 24, 2006 4:44 pm Post subject: |
|
|
The default 240 seconds should be fine. Ive run fastCGI since I got the new release and not had any problems. They most PHP processes Ive seen running is 3. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Mar 24, 2006 6:19 pm Post subject: |
|
|
I agree longer can be better but when you think about it if you suddenly get 100 hits in a 30 second period you will have quite a few processes load up and stay there, and possibly taking up memory that could otherwise be used elsewhere.
Ive kept mine to the default at the moment but I might increase it slightly and experiment with it. 240 seconds (4 mins) seems fine to me.
EDIT: TRUSTpunk deleted his post before I posted. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Mar 24, 2006 6:25 pm Post subject: |
|
|
Quote: |
EDIT: TRUSTpunk deleted his post before I posted. |
The Inquisitor,
I had to edit it but accidently deleted it. Since a day can cause problems
with the FastCGI Processes timeout, try 300 secs (5 mins). This should
be a much better option than 86400 secs (a day). :-)
It's up to you what timeout suits your needs. I'm starting to use 5 mins
instead of a day, because of what "admin" said about it. |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Mar 24, 2006 6:33 pm Post subject: |
|
|
If you site doesnt get many hits then a higher timeout may be useful too. Sometimes AbyssUnderground doesnt get a hit for over 30 minutes, although this is rare. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
loloyd -
Joined: 03 Mar 2006 Posts: 435 Location: Philippines
|
Posted: Sat May 27, 2006 8:21 am Post subject: |
|
|
Thank you for this thread. All the while I thought I had something malicious going on inside my machine. I thought - "WTF!? Why are there a few php-cgi.exe instances that don't terminate after a minute? What's going on? Had I been subject to an SQL injection attack via a PHP script?"
I promptly renamed my php-cgi.exe to php-cgi_disabled.exe and checked. Hmm... nothing amiss found. Incidentally, my site posted 503 Service unavailable. And wow, was Abyss hard to fool. It won't accept my config changes if it doesn't find php-cgi.exe as I have previously renamed it hehehe.
My paranoia has subsided now thanks to this thread. :oops: Then I set my FastCGI process timeout to 120 seconds.
-----
"I have this nagging fear that everyone is out to make me paranoid." _________________
http://home.loloyd.com/ is online if the logo graphic at left is showing. |
|
Back to top |
|
|
|