logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Can't apply process slot
Author
al0000



Joined: 29 Jan 2007
Posts: 24

PostPosted: Wed 16 Jul '08 16:26    Post subject: Can't apply process slot Reply with quote

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

PostPosted: Thu 17 Jul '08 9:21    Post subject: Reply with quote

Please read mod_fcgid doesn't honor IdleTimeout, MaxRequestsPerProcess
Back to top
al0000



Joined: 29 Jan 2007
Posts: 24

PostPosted: Thu 17 Jul '08 11:25    Post subject: Reply with quote

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

PostPosted: Thu 17 Jul '08 11:45    Post subject: Reply with quote

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

PostPosted: Thu 17 Jul '08 11:54    Post subject: Reply with quote

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

PostPosted: Thu 17 Jul '08 15:24    Post subject: Reply with quote

without setting DefaultMinClassProcessCount 0 the php process never dies.
Back to top
al0000



Joined: 29 Jan 2007
Posts: 24

PostPosted: Thu 17 Jul '08 15:26    Post subject: Reply with quote

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

PostPosted: Fri 18 Jul '08 18:08    Post subject: Reply with quote

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

PostPosted: Fri 18 Jul '08 18:10    Post subject: Reply with quote

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

PostPosted: Tue 22 Jul '08 13:21    Post subject: Reply with quote

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

PostPosted: Thu 24 Jul '08 19:40    Post subject: Reply with quote

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


Reply to topic   Topic: Can't apply process slot View previous topic :: View next topic
Post new topic   Forum Index -> Apache