503 error with Rails 2.3.2

#1
I'm not sure if I'm bringing up and old hat but I just upgrade to Rails 2.3.2 on my slicehost that runs litespeed and although litespeed doesn't seem to choke on it according to the logs it serves me with an 503 error.

I saw a post that was kind of addressing this issue but I didn't seem to understand too well, what's going on or how to fix it.

Is it an issue with litespeed? Can I solve it?

Any help is appreciated.

JM
 
#3
I'm still trying... I just messed up my server doing it... Bugger! Doesn't seem to be automatic at all!!!

I'll have to deal with this, but I'll be back to report on how it goes.

So you reckon the latest upgrade will do the trick?

JM
 
#4
I finally got the latest version of litespeed installed. BTW, nothing wrong with your docs. It turns out, that I can't read that well. :)

Anyway, after upgrading to 4.0.2 I was able to run the Rails app with version 2.3.2 no worries at all.

Thanks.

JM
 
#5
Actually cancel that... I just realized that I still had some pages in cache and after clearing that out, LiteSpeed still chokes on Rails 2.3.2.

So, we are back on square 1 except this time I have the current version of LiteSpeed installed.

Would you mind picking the issue up again?

JM
 

mistwang

LiteSpeed Staff
#6
Is there any Ruby processes get started?
Anything in Rails logs file? LSWS error.log and stderr.log?

4.x comes with a new RailsRunner.rb to support Rack, if you revert back to 3.3.24, you should copy over the old RailsRunner.rb, but 3.3.24 wont work with Rails 2.3.2 , only earlier Rails releases.
 
#7
LSWS error.log is fine
Rails access.log, error.log, production.log are fine

LSWS stderr.log ouput:

2009-04-29 02:04:53.921 [NOTICE] [78.46.95.46:39068-0#23point7.com] [uds://tmp/lshttpd/23point7.com:_.sock] Request in process stage, fail with 503

This output is not constant. My latest tests have not revealed the same behavior.

I watched the ruby process with top and when I start the virtual host, either with 2.2.2 or 2.3.2 a couple of ruby processes jump up and disappear but only with 2.2.2 one ruby process reappears presumably because the website is served.
 
#9
Yes, it runs find under Mongrel (my development system) and Webrick (my production server).

I'm yet to test a blank rails app... I'll do that today and report back.

JM
 
#10
I created an app from scratch and used ./script/generate scaffold post title:string body:text to create some functionality and database access.

I simply copied the folder on the server and restarted the virtual host with the LS web console but neither 2.2.2 nor 2.3.2 seem to work now. 503 is omnipresent.

See the error output: http://pastie.org/466422

I'm getting more confused than find clarity. What could cause this strange behavior?

JM
 

mistwang

LiteSpeed Staff
#11
I think an App generated by Rails 2.3.2 is likely to break with 2.2.2.
I only care about the result with 2.3.2.
If the app can be easily packed, please send it to bug@... , we can try it in our lab.
 

mistwang

LiteSpeed Staff
#13
Your app works fine in our lab. So, it must be your local environment.
Please double check the RailsRunner.rb against the one in our installation package 4.0.2

Check if there are multiple version of Ruby installed and the correct one has been used.
 
#14
any luck?

I'm having 503 errors as well...

They seem to come more often when the server is under load, or this is the first request of this rails app since litespeed restarted...

I tried updating the timeouts in the rails virtual host conf... but they're pretty long, and still it's happening...
 
#15
OK... good to hear that it works at least.

Now, I'd probably need some help with all those checks because I'm not that solid in linux etc. But this is how far I've gotten:

First I did look for RailsRunner.rb on my server and this is the output:

/home/jms/sources/lsws-3.1/fcgi-bin/RailsRunner.rb
/home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb
/home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb.2.3
/usr/local/lsws/autoupdate/lsws-3.3.1/fcgi-bin/RailsRunner.rb
/usr/local/lsws/fcgi-bin/RailsRunner.rb
/usr/local/lsws/fcgi-bin/RailsRunner.rb.2.3

I have no RailsRunner.rb installed on my local machine.

I checked the versions with 'ruby -v'

Local: ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
Server: ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.1.0]

I found the ruby installations here:

Local: /opt/local/lib/ruby/1.8
Server: /usr/lib/ruby/1.8

I can't seem to find other installations but I'm not sure how to look for them.

Is there anything else you'd need to know?
 

pguy

Active Member
#16
Copy /home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb.2.3 to /usr/local/lsws/fcgi-bin/RailsRunner.rb

& /home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb.2.3 to /usr/local/lsws/fcgi-bin/RailsRunner.rb.2.3

and over write to ensure you have the latest RailsRunner.rb & .rb.2.3
 
#18
outdated RailsRunner.rb??

Copy /home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb.2.3 to /usr/local/lsws/fcgi-bin/RailsRunner.rb

& /home/jms/sources/lsws-4.0.2/fcgi-bin/RailsRunner.rb.2.3 to /usr/local/lsws/fcgi-bin/RailsRunner.rb.2.3

and over write to ensure you have the latest RailsRunner.rb & .rb.2.3


Is this something we must manually do everytime we upgrade?

Also, How can we serve both rails v2.3 and rails v2.2 on the save server? Does our virtual host automatically choose between the two?
 

mistwang

LiteSpeed Staff
#19
Please check the RailsRunner.rb in the latest 4.0.x release, it should be compatible with both v2.2 and v2.3.

You may need to explicitly specify the rails version with "RAILS_GEM_VERSION" in environment.rb if you want to use rails 2.3.x
 
Top