Jamie McClelland: Avoiding Apache Max Request Workers Errors
Wow, I hate this error:
And we invoke PHP-FPM via this apache snippet:
With these settings in place, what happens when we use up all 12 This snippet is the way you can configure the proxy configuration we setup in
the
AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers settingFor starters, it means I have to relearn how
MaxRequestWorkers functions in Apache:
For threaded and hybrid servers (e.g. event or worker), MaxRequestWorkers restricts the total number of threads that will be available to serve clients. For hybrid MPMs, the default value is 16 (ServerLimit) multiplied by the value of 25 (ThreadsPerChild). Therefore, to increase MaxRequestWorkers to a value that requires more than 16 processes, you must also raise ServerLimit.Ok remind me what
ServerLimit refers to?
For the prefork MPM, this directive sets the maximum configured value for MaxRequestWorkers for the lifetime of the Apache httpd process. For the worker and event MPMs, this directive in combination with ThreadLimit sets the maximum configured value for MaxRequestWorkers for the lifetime of the Apache httpd process. For the event MPM, this directive also defines how many old server processes may keep running and finish processing open connections. Any attempts to change this directive during a restart will be ignored, but MaxRequestWorkers can be modified during a restart. Special care must be taken when using this directive. If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated. If both ServerLimit and MaxRequestWorkers are set to values higher than the system can handle, Apache httpd may not start or the system may become unstable. With the prefork MPM, use this directive only if you need to set MaxRequestWorkers higher than 256 (default). Do not set the value of this directive any higher than what you might want to set MaxRequestWorkers to. With worker, use this directive only if your MaxRequestWorkers and ThreadsPerChild settings require more than 16 server processes (default). Do not set the value of this directive any higher than the number of server processes required by what you may want for MaxRequestWorkers and ThreadsPerChild. With event, increase this directive if the process number defined by your MaxRequestWorkers and ThreadsPerChild settings, plus the number of gracefully shutting down processes, is more than 16 server processes (default).Got it? In other words, you can consider raising the
MaxRequestWorkers
setting all you want, but you can t just change that setting, you have to read
about several other compliated settings, do some math, and spend a lot of time
wondering if you are going to remember what you just did and how to undo it if
you blow up your server.
On the plus side, typically, nobody should increase this limit - because if the
server runs out of connections, it usually means something else is wrong.
In our case, on a shared web server running Apache2 and PHP-FPM, it s usually
because a single web site has gone out of control.
But wait! How can that happen, we are using PHP-FPM s max_children setting to prevent
a single PHP web site from taking down the server?
After years of struggling with this problem I have finally made some headway.
Our PHP pool configuration typically looks like this:
user = site342999writer
group = site342999writer
listen = /run/php/8.1-site342999.sock
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 12
pm.max_requests = 500
php_admin_value[memory_limit] = 256M
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/8.1-site342999.sock fcgi://localhost"
</FilesMatch>
max_children?
According to the docs:
By default, mod_proxy will allow and retain the maximum number of connections
that could be used simultaneously by that web server child process. Use the
max parameter to reduce the number from the default. The pool of connections
is maintained per web server child process, and max and other settings are
not coordinated among all child processes, except when only one child process
is allowed by configuration or MPM design.
The max parameter seems to default to the ThreadsPerChild, so it seems that
the default here is to allow any web site to consume ThreadsPerChild (25) x
ServerLimit (16), which is also the max number of over all connections. Not
great.
To make matter worse, there is another setting available which is mysteriously
called acquire:
If set, this will be the maximum time to wait for a free connection in the
connection pool, in milliseconds. If there are no free connections in the
pool, the Apache httpd will return SERVER_BUSY status to the client.
By default this is not set which seems to suggest Apache will just hang on to
connections forever until a free PHP process becomes available (or some other
time out happens).
So, let s try something different:
<Proxy "fcgi://localhost">
ProxySet acquire=1 max=12
</proxy>
SetHandler statement above. It s documented on the Apache mod_proxy
page.
Now we limit the maximum pool size per process to half of what is available for
the entire server and we tell Apache to immediately throw a 503 error if we
have exceeded our maximum number of connecitons.
Now, if a site is overwhelmed with traffic, instead of maxing out the available
Apache connections while leaving user with constantly spinning browsers, the
users will get 503 ed and the server will be able to server other sites.
My first impressions of the device are good - it is heavier than I anticipated,
but very vell made. It is very easy to assemble and disassemble and it feels
like it can take a hit.
When I started it the first time it took some minutes to boot because of the
new memory module, but then it told me right away that it could not detect an
operating system. As usual when I want to install a new system, I created
a
I only learned later, that the SecureBoot setting is in a separate section
that is not part of the main BIOS configuration dialog. There is an Administer
Secure Boot icon which you can choose when starting the device, but
One small downside of the keyboard is that it does not have a backlight, which
was a surprise. But given that this is a frame.work laptop, there are chances
that a future generation of the keyboard will have backlight support.
The screen of the laptop can be turned all the way around to the back of the
laptops body, so it can be used as a tablet. In this mode the keyboard gets
disabled to prevent accidently pushing keys when using the device in tablet
mode.
For online meetings I still prefer using headphones with cables over bluetooth
once, so I m glad that the laptop has a headphone jack on the side.
Above the screen there are a camera and a microphone, which both have separate
physical switches to disable them.
I ordered a couple of expansion cards, in the current setup I use two USB-C,
one HDMI and one USB-A. I also ordered a 1TB expansion card and only used this
to transfer my
And this is the time when one realizes that she only has one white
camisole left. And it s summer, so I m wearing a lot of white shirts,
and I always wear a white camisole under a white shirt (unless I m
wearing a full chemise).
Not a problem, I have
At bust level it s now a bit too wide, and it gapes a bit under the
arms, but I don t think that it s going to cause significant problems,
and (other than everybody on the internet) nobody is going to see it, so
it s not a big deal.
I still have some linen, but I don t think I m going to make another one
with the same pattern: maybe I ll try to do something with a front
opening, but I ll see later on, also after I ve been looking for the
missing jersey in a few more potential places.
As for now, the number of white camisoles I have has doubled, and this
is progress enough for today.
As I often do, this year I have also prepared a set of personalized maps
for your OpenPGP keysigning in DebConf25, in Brest!
What is that, dare you ask?

Single signon is a pretty vital part of modern enterprise security. You have users who need access to a bewildering array of services, and you want to be able to avoid the fallout of one of those services being compromised and your users having to change their passwords everywhere (because they're clearly going to be using the same password everywhere), or you want to be able to enforce some reasonable MFA policy without needing to configure it in 300 different places, or you want to be able to disable all user access in one place when someone leaves the company, or, well, all of the above. There's any number of providers for this, ranging from it being integrated with a more general app service platform (eg, Microsoft or Google) or a third party vendor (Okta, Ping, any number of bizarre companies). And, in general, they'll offer a straightforward mechanism to either issue OIDC tokens or manage SAML login flows, requiring users present whatever set of authentication mechanisms you've configured.
Everybody is trying out AI assistants these days, so I figured I'd jump on that train and see how fast it derails.
I went with
Welcome to post 49 in the
In this post, I demonstrate the optimal workflow for creating new Debian packages in 2025, preserving the upstream git history. The motivation for this is to lower the barrier for sharing improvements to and from upstream, and to improve software provenance and supply-chain security by making it easy to inspect every change at any level using standard git tooling.
Key elements of this workflow include:
In this post, I demonstrate the optimal workflow for creating new Debian packages in 2025, preserving the upstream git history. The motivation for this is to lower the barrier for sharing improvements to and from upstream, and to improve software provenance and supply-chain security by making it easy to inspect every change at any level using standard git tooling.
Key elements of this workflow include:

So it kind-of sort-of made sense, when I saw a Toshiba-IBM keyboard
being sold for quite cheap (MX$400, just over US$20) to try my luck with
it:
This is quite an odd piece of hardware, built in 2013 according to its
label. At first I was unsure whether to buy it because of the weird
interface it had, but the vendor replied they would ship a (very long!) USB
cable with it, so
As expected, connecting it to Linux led to a swift, errorless recognition:
Within minutes of receiving the hardware, I had it hooked up and started
looking at the events it generated However the romance soon started to
wane. Some of the reasons:
Toolboxes and Hammers Be YouEveryone has a story. We all started from somewhere, and we re all going somewhere.Ten years ago this summer, I first heard of Ubuntu. It took me time to learn how to properly pronounce the word, although I m glad I learned that early on. I was less fortunate when it came to the pronunciation of the acronym for the Ubuntu Code of Conduct. I had spent time and time again breaking my computer, and I d wanted to start fresh.I ve actually talked about this in an interview before, which you can find here (skip to 5:02 6:12 for my short explanation, I m in orange):