Spawning is a wsgi server which supports multiple processes, multiple threads, green threads, non-blocking HTTP io, and automatic graceful upgrading of code
In short, if the child processes are running an application that takes a long time chronologically to handle requests, the controller will only start one new child process when sent SIGHUP, until the old children start to die off.
Repro:
Write a wsgi application that sleeps for a long time.
Occupy all children with handling requests (via ab or similar)
pkill -HUP -f spawning_controller
Hit the status page or check with ps uax | grep spawning_child | grep -v grep immediately; there will be only one additional process started. There should be 2x the number of processes.
This issue is caused by signal aliasing. The children all send it simultaneously to the controller, but the handler only gets called once.
In short, if the child processes are running an application that takes a long time chronologically to handle requests, the controller will only start one new child process when sent SIGHUP, until the old children start to die off.
Repro:
This issue is caused by signal aliasing. The children all send it simultaneously to the controller, but the handler only gets called once.