Author |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Wed 16 Jul '08 16:26 Post subject: Can't apply process slot |
|
|
Hello,
My configuration is the following:
Windows 2003 SP2
MySQL 5.0.51b-community-nt
PHP 5.2.6
eAccelerator 0.9.5.3
Apache 2.2.9
cgi-fcgi
ThreadsPerChild 400
MaxRequestsPerChild 30000
<IfModule mod_fcgid.c>
MaxRequestsPerProcess 500
DefaultMaxClassProcessCount 250
IdleTimeout 60
</IfModule>
My website is based on Mambo and generates about 200.000 pageviews per day.
Problem is that, every now and then, the website stops responding (sending 500 internal server error) and i can see tons of these on the apache log:
Wed Jul 16 16:22:24 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index.php
[Wed Jul 16 16:22:25 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
[Wed Jul 16 16:22:26 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
[Wed Jul 16 16:22:26 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
[Wed Jul 16 16:22:27 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
[Wed Jul 16 16:22:27 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index.php
[Wed Jul 16 16:22:28 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
[Wed Jul 16 16:22:29 2008] [warn] mod_fcgid: can't apply process slot for D:/www/****.com/public/index3.php
Today, the website was offline for more than 1 hour because of this. I had to kill all php-cgi.exe instances and restart apache.
What could cause this?
Any ideas how to fix it?
Thanx. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Thu 17 Jul '08 11:25 Post subject: |
|
|
Hmm..
So there's basically no solution for me? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 17 Jul '08 11:45 Post subject: |
|
|
There is! If you read the full thread you read that you have to set an variable that the process ends and a new one can start. Also you need to define
MaxProcessCount.
If you still have a question please post again. |
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Thu 17 Jul '08 11:54 Post subject: |
|
|
James Blond wrote: | There is! If you read the full thread you read that you have to set an variable that the process ends and a new one can start. Also you need to define
MaxProcessCount.
If you still have a question please post again. |
Thank you for your reply.
However, I'm a bit confused.
Which variable is that?
The default number for MaxProcessCount is 1000
I will set it to 3000.
I will also set DefaultMaxClassProcessCount from 100 to 300 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 17 Jul '08 15:24 Post subject: |
|
|
without setting DefaultMinClassProcessCount 0 the php process never dies. |
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Thu 17 Jul '08 15:26 Post subject: |
|
|
James Blond wrote: | without setting DefaultMinClassProcessCount 0 the php process never dies. |
Understood.
I will make the changes and get back with results.
Thanx! |
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Fri 18 Jul '08 18:08 Post subject: |
|
|
Still, the issue remains:
[Fri Jul 18 16:31:36 2008] [notice] Child 13648: Waiting 240 more seconds for 70 worker threads to finish.
[Fri Jul 18 16:31:36 2008] [warn] mod_fcgid: can't apply process slot for D:/www/******.com/public/index3.php |
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Fri 18 Jul '08 18:10 Post subject: |
|
|
This is the configuration i'm using now:
ThreadsPerChild 400
MaxRequestsPerChild 30000
<IfModule mod_fcgid.c>
MaxRequestsPerProcess 500
DefaultMaxClassProcessCount 250
IdleTimeout 60
MaxProcessCount 2000
DefaultMinClassProcessCount 0
</IfModule> |
|
Back to top |
|
al0000
Joined: 29 Jan 2007 Posts: 24
|
Posted: Tue 22 Jul '08 13:21 Post subject: |
|
|
This continues and puts down my website for hours
Could anyone think of what could cause this error???
[Tue Jul 22 14:20:29 2008] [warn] mod_fcgid: can't apply process slot for D:/www/xxxxxx.com/public/index3.php |
|
Back to top |
|
PipoDeClown
Joined: 20 Dec 2005 Posts: 77
|
Posted: Thu 24 Jul '08 19:40 Post subject: |
|
|
try install Process Explorer or something,
inspect if Apache really can handle your 400 threads per child,
check memory usage,
tell more what happened before u get that error,
does the same also happens without eaccelerator? or with different settings?
does it happen with the default settings for mod_fcgid? |
|
Back to top |
|