Debian 8, Apache 2.4.10: Scoreboard is full, not at MaxRequestWorkers

Fresh install of Debian 8. After running my web server for a few minutes/hours, Apache2 stops working. I always get the error "Scoreboard is full, not at MaxRequestWorkers" from Apache2 error.log.

This workaround works for me, however - I do not want to change MPM mode to prefork. So is there any other solution to this? Like upgrading the Apache2 version? I'm relatively new to Linux/Debian, so I'm not sure what to do exactly whatsoever.


Solution 1:

This was a bug in apache for mpm-event and mpm-worker, that you may still be experiencing:

https://bz.apache.org/bugzilla/show_bug.cgi?id=53555

The bug is in the scaling up & down of the number of server processes.

The real 'fix' is in place in more recent versions I think, but you can easily work-around this problem by following the advice from ScottE in Comment12 in the bugzilla report. In it, he says: "...If we set MinSpareThreads and MaxSpareThreads equal to MaxRequestWorkers (so Apache doesn't attempt to scale down processes), the issue goes away (as expected, but validates (maybe?) this has to do with Apache scale-down). ..."

(added my emphasis)

I have had success so far with this issue by setting MaxSpareThreads = MaxRequestWorkers. AND by understanding the relationship between workers, threads, servers, and such. The latter is very important. The basic directives needed for the event MPM are simple. The way to scale your service is to set the above two values to the number of client connections you want to support. Everything else will just work. See: http://httpd.apache.org/docs/2.2/mod/worker.html

IMHO: If your goal is to have apache scale the number of "server" processes based on need, then perhaps you shouldn't be using either event or worker models. Calculate the number of client connections you want to allow, then configure them to be always available. Otherwise, update your apache, or configure the workaround as above and live with it.

Good luck!