rtyler/Spawning

Under certain conditions, controller reloading is not as aggressive as it should be

rdw opened this issue · 1 comments

rdw commented

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.

rdw commented

Controller starts a new batch of children immediately when reloading. This closed by 847e76a

Tweaked css a little bit in the status page after looking at a lot of inactive children.