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: GracefulShutdownTimeout setting is doing nothing
Author
deepwell



Joined: 19 Jul 2025
Posts: 2
Location: AT, Vienna

PostPosted: Sun 20 Jul '25 12:12    Post subject: GracefulShutdownTimeout setting is doing nothing Reply with quote

Hi all!

we have an issue with Apache in connection to long running WebSocket connections and graceful reloads initiated by logrotate.

Whenever logrotate initiates the graceful reload (every morning), all Apache workers currently handling open WebSocket connections go into 'G' state and - as the WebSocket connections stay open (which is their primary purpose!) - stay that way. This puts the whole Apache process that worker belongs to (we are using event MPM) into a state of having some workers in 'G' state and the rest not accepting new connections.

Usually that means that at least one Apache process ends up in that state every day - and after a few days we reach ServerLimit, the scoreboards is full and we get a "AH00485: scoreboard is full, not at MaxRequestWorkers".

Easy fix: Just set `GracefulShutdownTimeout` to something not Zero and Apache should wait that amount of seconds for the 'G' state workers to finish and if they don't, simply kill them and continue the reload.

At least that is what
https://httpd.apache.org/docs/2.4/mod/mpm_common.html#GracefulShutdownTimeout
suggests IMHO.

But in fact it seems that `GracefulShutdownTimeout` does not do anything!

Even if setting this to just a few seconds, the 'G' state workers stay in that state forever and the hole Apache process is useless (and soon the whole Apache server)...Sad


Did I misinterpret the documentation?

Is there any other way to make Apache not wait forever for WebSocket connections to be closed before finishing a graceful reload? Without killing also "normal" connections!

Does this make Apache totally unusable as a reverse proxy for WebSocket connections?
Back to top


Reply to topic   Topic: GracefulShutdownTimeout setting is doing nothing View previous topic :: View next topic
Post new topic   Forum Index -> Apache