Its running a simple script that logs the user to the database.
Obviously this isn’t a good candidate for a background job, this is
just something simple I’m using to test.
Any ideas why mongrel is holding on to that thread? I am calling
exit_success! at the end of my run action in the bj script, it appears
the script is exiting properly.
I also find it strange that the sessions_controller is referred to in
that backtrace.
Here is an update. I tried in development vs production and that
didn’t make a difference. However, I only saw this behavior on
mongrel. On thin and webrick it would quit quickly.
Here is an update. I tried in development vs production and that
didn’t make a difference. However, I only saw this behavior on
mongrel. On thin and webrick it would quit quickly.
it’s a mongrel bug - mongrel tries to reap threads it does not own.
nothing to do with bj and you can safely ignore.
But what’s the solution to it delaying the shutdown of mongrel?
patch mongrel.
bj doesn’t delay the shutdown - it merely creates a thread which
mongrel insists on reaping. the fix is for mongrel not to reap
threads it hasn’t started.