Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gunicorn sends info message Handling signal: winch

Tags:

Can someone pls help to know the reason why gunicorn sends info message Handling signal: winch when Application is idle.

There is no error , application continues to respond but when it is idle 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 , do One need to take some action for this?
  3. any brief info on WINCH and all others signal meaning Thanks in advance !
like image 573
BrB Avatar asked Jan 23 '20 17:01

BrB


People also ask

What is Handling signal winch?

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.

How many employees does Gunicorn have?

Gunicorn should only need 4-12 worker processes to handle hundreds or thousands of requests per second. Gunicorn relies on the operating system to provide all of the load balancing when handling requests.


1 Answers

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).
like image 70
Tolly Avatar answered Sep 18 '22 12:09

Tolly