Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Passenger losing threads #28

mareczek opened this Issue Jan 12, 2012 · 7 comments


None yet
2 participants

Hello again :)

I know that passenger is losing threads :( is there a way to revive them? I have read: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_smart_spawning_gotcha_2_the_need_to_revive_threads

Can you provide code to revive the lost threads?

I would be gratful for any kind of solution/hack :)

Thank you for your work!

@mareczek mareczek closed this Jan 12, 2012


jmettraux commented Jan 12, 2012


searching the mailing list for "passenger" could help.


Best regards,


Eventually i resolved this problem by changing the spawn method in the apache virtual host.
Just set:
PassengerSpawnMethod conservative

That resolved the problem


jmettraux commented Jan 15, 2012

Thanks for sharing !

I was wondering if the scheduler could have a additional setting called 'keep_alive'. If such setting would be set to true it might listen to SIGTERM signal or whatever different signal is being sent to kill the process.

Is it possible?

There is something to tra

@mareczek mareczek reopened this Jan 15, 2012

@mareczek mareczek closed this Jan 15, 2012

Sorry for the mess above, i'm not drunk! ;)

In ruby 1.9.3 there is something to trap signals : http://www.ruby-doc.org/core-1.9.3/Signal.html

Maybe the schedulere could then perform some task to make the process alive or just trap it for good.

Tell me what you think


jmettraux commented Jan 16, 2012


I think it's a "desperate move". And trapping signals, IMHO, should be left to applications, not libraries.

IIRC I've seen people getting on fine by telling somehow their passenger to keep the initial Ruby process around, with its original threads.

Have you considered using something like Whenever (https://github.com/javan/whenever)? Or simply a cron job that runs a rake task every minute that checks if there is something to do? Rufus-scheduler is a poor and naive library trying to do one or two things good. I cannot save the whole planet.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment