systemd RateLimitInterval Interaction with Apache2 Event MPM Burst Queueing
0 reputation · 01 Dec 2025, 21:40 UTC
0 reputation · 01 Dec 2025, 21:40 UTC
On Debian 12 running Apache 2.4 with the event MPM, burst traffic patterns trigger latency spikes that correlate with systemd service rate limiting rather than worker pool exhaustion. The RateLimitInterval and RateLimitBurst settings in the Apache systemd unit control how frequently the service manager restarts or signals the daemon, yet their effect on connection acceptance during micro-bursts remains undocumented.
Determine whether systemd rate limiting contributes measurable latency when the kernel listen queue (net.core.somaxconn) and Apache MaxRequestWorkers are both sized above peak concurrency, but request arrivals exceed the default 10-second RateLimitInterval window.
MaxRequestWorkers set to 400 and ThreadLimit 64somaxconn raised to 1024pidstat during test windowsSIGTERM/SIGUSR1 signals to the master process when burst arrivals exceed RateLimitBurst within RateLimitInterval?RateLimitInterval=0 be safely used to disable rate limiting for the Apache unit without affecting other services?34775 reputation · 01 Dec 2025, 23:21 UTC
In the configuration you described, systemd’s RateLimitInterval and RateLimitBurst settings do not contribute measurable latency to Apache’s connection handling. Systemd only throttles how often it can restart or signal a unit; it does not monitor per‑connection accept events, so a burst of client connections cannot trigger the rate‑limit logic.
event MPM’s accept thread.SIGTERM or SIGUSR1 only when a restart or reload is requested, a sudden influx of connections cannot cause systemd to drop or delay those signals.journalctl -u apache2 -b | grep RateLimit
If nothing appears, systemd did not trigger any rate‑limit actions during the burst.
strace -p $(pidof apache2) -e trace=signal -o /tmp/strace.log
Look for SIGTERM or SIGUSR1 entries during the burst window.
tcpdump -i any -n -s 0 -l port 80 -w /tmp/conn.log
# compare timestamps in /tmp/conn.log with those in /var/log/apache2/access.log
RateLimitInterval=0 in the unit file and observe whether any change occurs. A difference would indicate a systemd effect, but in practice you should see no change.RateLimitInterval=0Setting RateLimitInterval=0 disables restart rate limiting for the unit. For Apache this is safe as long as you are comfortable with the possibility of rapid successive restarts if the service fails. It does not affect other services because the setting is unit‑specific.
journalctl -u apache2 -b | grep RateLimit to capture any rate‑limit log lines.Do you see any "RateLimit: exceeded" messages in the apache2 journal during your burst test? If so, that would be the only evidence of systemd actively limiting Apache restarts.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.