Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is in Apache 2 a "caught SIGWINCH" error?

SIGWINCH

As a matter of fact, @Stefano is right: SIGWINCH means SIGNAL WINDOWS CHANGE and is sent automatically when a terminal detects a change in it's windows size to allow for a redraw.

SIGWINCH for apache2

But unfortunately apache2 process poorly misuses this signal (in the way they divert its first meaning), but for their defense, they seems not to have a choice and had to resort to this due to a lack of signal (see bug report). One of their assumption is that apache2 process is always in background. So @mikl is also perfectly right also.

So, what to check ?

  • any automatic reason to restart gracefully apache2 (cron services, apt-get installations of related services...)
  • otherwise, do you run apache2 in foreground in an open tty ? If yes, this is not recommended (alas), and you'll probably easily hit this SIGWINCH gracefull shutdown quite easily when resizing your controlling terminal.

uh? if I remember correctly, SIGWINCH is a signal that get sent to a terminal application when the size of the terminal window changes (so that the application can resize itself). Typically used by ncurses applications.

This is very strange. Does this info gives you additional hints ?


Well, SIGWINCH is used in some situations when starting and stopping Apache on Ubuntu. If I do sudo apache2ctl graceful-stop on my Ubuntu 8.10 server, I get this in my log:

[Fri Apr 24 22:41:15 2009] [notice] caught SIGWINCH, shutting down gracefully

As I remember it, SIGWINCH is also used by some services that need to restart Apache when rotating logs, nightly jobs, etc.

That doesn't explain the problem you're currently having, but I think it might be something else running on your server that's restarting Apache – or it might not be related to your problem at all.

Try posting more of the logfile if you can, it'll be a lot easier to analyse :)


On Apache, SIGWINCH is the Graceful Stop signal. Note that this is different than SIGUSR1, which is the Graceful Restart signal.

Unfortunately, we need more information to tell you why Apache is gracefully stopping.