View Single Post
  #10  
Old 03-03-2009, 08:23 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by russ816 View Post
I think I got it. Just took some time to find the right combination of settings. I've attached the file that needs to be run. It uses the same setup you would use as a normal rack app with lsws. I'll post full details on the setup tomorrow.
Thanks! It is very close what I thought.
Some code are not necessary, could clear it up a little bit.
Only one concern, our RailsRunner.rb takes care of the DB connection problem caused by fork(), so it close DB connection then reopen it after fork().

The default Rack::Handler::LSWS does not have this logic, so it may not work properly.

I am thinking about a dedicate Rack handler for Rails, maybe call it Rack::Handler::LSRAILS, it should be similar to Rack::Handler::LSWS, just add logic like the what we have in RailsRunner.rb . All the code could be in one file.
Reply With Quote