«

»

Apr 30

Workaround for scoreboard is full not at MaxRequestWorkers

Error!

[Mon Apr 18 11:51:30.780477 2016] [mpm_event:error] [pid 13139:tid 139928749205312] AH00485: scoreboard is full, not at MaxRequestWorkers

You are here because your Apache server got hung and error log is full with above “[mpm_worker:error] scoreboard is full not at maxrequestworkers ” error. Unfortunately this is long time reported bug on Apache event mpm which can find at here . since this bug is not yet fixed at Apache event mpm, many experts are suggesting to move into either Prefork mpm or Worker mpm which is quite similar to event mpm. Also some communities suggests to degrade the Apache version into 2.
Specially on production environment , it is really hard to move into from one mpm to another or downgrade the Apache version. Sometimes those older version may contains vulnerabilities or not support required features, so downgrade is not a good solution at all the time.

Here I’m looking to discuss workaround for this error / bug . It’s better to remember there is nothing much to do with Apache configuration, because it’s a bug. But if you are lucky enough following workaround may work for you.

Below is my server environment
OS :- Centos 7
RAM :- 12 GB
Apache version :- 2.4.16

You are to edit httpd.conf and then later going to restart Apache , so make sure you should have sufficient permission to do those tasks(need to root privileges).

01) Open httpd.conf file

02) Find event mpm configuration snippet

 

Set event mpm directives values like below , hopefully you have change according to your environment. For more details read below .

 

03)Directives which fix scoreboard is full not at maxrequestworkers error

I would like to discuss import directives (variable) which you need to adjust in order to solve  “[mpm_worker:error] scoreboard is full not at maxrequestworkers” error

You can refer variable definition in more depth from official Apache documents

MaxClients :- in new Apache version this variable called as MaxRequestWorkers. this value is calculate by multiplying
ThreadsPerChild and ServerLimit . by raising MaxClients / MaxRequestWorkers you can expand Apache server scoreboard.

MaxRequestsPerChild :- It is no of request child can handle. default value is 0 , it means child will handle unlimited request. set the the value to 0 (or comment it then it will be assigned default value of 0 ).

GracefulShutdownTimeout :- Reduce this value something around 5 seconds. so Apache itself remove request which is on Graceful state.

MinSpareThreads , MaxSpareThreads :- here use default value, some documents recommend to increase the gap between two variable by something like this.
   MinSpareThreads = MaxRequestWorkers / 4
   MaxSpareThreads = MinSpareThreads * 3

MaxKeepAliveRequests :- This is outside to the event mpm variable scope. Apache itself destroy keep alive request greater than to this variable. Here the variable define on global level which means it will apply to all Apache virtual hosts , but you can set it on Apache virtual host level if you wish.

Please give your thoughts about this workaround, I’m always happy to hear them and give my opinions.

2 comments

  1. Daniel Aleksandersen

    This is interesting, because I had to increase GracefulShutdownTimeout in order to get rid of these errors!

    1. admin

      How about MaxKeepAliveRequests ? have you set any value or keep it as default.
      However if I set some value for MaxRequestsPerChild (ex:- 1000), then again these errors are appeared so I keep default value of 0.

Leave Your Thought Here