'Gunicorn sends info message Handling signal: winch

Why does Gunicorn send info message Handling signal: winch when application is idle?

There is no error, as the application continues to respond, but when it is idle, the above message is displayed.

I could not find more information in Gunicorn handling signal documentation section except WINCH: Gracefully shutdown the worker processes when Gunicorn is daemonized.

  1. What is the meaning here, Gunicorn daemonized?
  2. Handling signal: winch info when idle, does one need to take some action for this?
  3. Any brief info on WINCH and all other signal meanings?


Solution 1:[1]

A winch signal (or SIGWINCH, short for Signal Window Change) is normally sent to applications when the terminal window size changes, so that applications know to redraw on the screen. However, gunicorn interprets it to shutdown the worker processes, but only when the application is daemonized. Daemonized is just another way of saying an application is running in the background. This means that while gunicorn isn't running as a background process (i.e. it's on your screen), it handles the signal and doesn't shut down the worker processes.

So to answer your questions:

  1. Daemonized means an application is running in the background.
  2. You don't have to take any action at all, when gunicorn is running in the background it won't be getting any Winch signals, so you don't have to worry about it shutting down.
  3. Winch is normally sent when a terminal window is resized (you can see this by resizing your terminal window while gunicorn is visible, you'll see a lot of handling signal messages).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tolly