1. 18

  2. 7

    If you ever find yourself in a similar situation, take a look at TracePoint. While not touched on here, its a very good tool for digging into production and seeing whats going on.

    1. 5

      It’s not fully spelled out in the article, but from what I can tell the thing that terminates all the threads is when the child (forked by resque) exits. That would raise in all its threads, causing the ensure block to be triggered.

      In short, don’t mix forked child processes and threads in ruby )-: