How does Passenger decide when to fork a new process, and can I configure in any meaningful way how many proccesses it should handle (other than "smart" and "conservative" flags in the configuration?) Alternatively, is there any way to debug why a rails app running under Phusion would suddenly freeze up?
Background:
I'm using Phusion Passenger with the Apache2 server, and for the most part, things are doing fine. I'm less concerned about load, and more concerned about blocking: regular mongrel will tie up the entire app if it hits a long controller method (say, a method that sleeps for ten seconds), and no other web page can be served until the method has completed. With Passenger, I can hit the same method, and still open up a new browswer and hit faster loading pages of the same app with no problem.
SOMETIMES.
And that "sometimes" is a problem. If a method takes long enough (in my case, does an external network call that never comes back), the entire application will once again hang, even with all the spiffy thread forking, or whatever..
My understanding is that the way Passenger works is that it sort of forks off entire new instances of rails every time it needs to, usually in the context of too many people connecting at once.
It DOES seem to work with long methods, though...but I can't see any references to how or why (or more importantly, how to tweak or configure this proccess). Or even how to figure out what the issue might be (Do I need to let Phusion fork off MORE threads, does it just not work with long methods over a certain length of time?)