503 troubleshooting

Discussion in 'Install/Configuration' started by djsodom, Jan 2, 2007.

  1. djsodom

    djsodom New Member

    Hi,

    I've got a fresh install (2.6) on a Fedora 6 box (actually ec2 image). Used the EasyRailsTemplate to create a vhost. The listener seems looks right. There are no notices or erros on restart.

    However, when I try to access my rails site it times out and gives me a 503 Service Unavailable message.

    Nothing shows up in my rails dev log. No errors show up in the litespeed log either.

    I know its going to be something silly I'm overlooking.

    Where should I begin troubleshooting this?

    Steve
  2. mistwang

    mistwang LiteSpeed Staff

    Here you go. :)

    Make sure the rails application works well under WEBrick or mongrel running as the user who own the application.
    Double check file permissions for your rails application directory.
    Make sure Memory and process limit has been set high enough.
    Turn on LSWS debug logging by change "Debug Level" to "High".
    Check stderr.log in addition to error.log.
  3. djsodom

    djsodom New Member

    • Make sure the rails application works well under WEBrick or mongrel running as the user who own the application.

    webbrick starts up fine with no errors. The console starts up too and I can access my models.

    • Double check file permissions for your rails application directory.

    Permissions look fine for my rails directory. Its owned by steveodom and group www. Litespeed is running under user lsws, who also belongs to group www. All the group permissions are set to allow rw. I can start up webbrick as lsws user with no problem.

    • Make sure Memory and process limit has been set high enough.

    I'll leave this to check last, because I think my problem lies below. Everything is the default right now.


    • Turn on LSWS debug logging by change "Debug Level" to "High".
    • Check stderr.log in addition to error.log.

    Here is the recurring error in my stderr.log:

    I previously installed the ruby-lsapi gem and got the message "Successfully installed ruby-lsapi-1.11". My permissions for my opt/lsws directory are:

    I'm running litespeed with user lsws.

    Here is output from my error.log:

    thanks for your help,

    Steve
  4. mistwang

    mistwang LiteSpeed Staff

    Looks like you need to double check your lsapi installation. :)
  5. djsodom

    djsodom New Member

    Yes, I didn't have the make package installed and installing my ruby-lsapi gem, though it says successfully install, wasn't complaining loud enough for me.

    I installed the make package and it seems like ruby-lsapi installs correctly, though I can't 100% tell. Here is what is generated:

    I'm still getting the same error messages in stderror.log as detailed in my previous post.

    I deleted my existing virtual host and started over using the EasyRails template and as per step 4 of: http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:ruby_rails_easy

    I'm not doing these steps as per this post::
    Copy dispatch.lsapi to Rails app's public/ directory
    - Change shebang line to reference /opt/local/bin/ruby
    - Change rewrite rule in public/.htaccess as described in Ruby LSAPI README
    - Add same rewrite rule in Litespeed admin console (just in case)
    - Server Configuration > External Apps > Add, Type: LSAPI APP

    I'm under the impression I don't have to do those steps if I use the template.

    What else should I try?

    Thanks,

    Steve
  6. mistwang

    mistwang LiteSpeed Staff

    It complains "i386-redhat-linux-gcc: Command not foun", do you have gcc installed on your system.

    Maybe you should try installing ruby-lsapi package manually.
  7. djsodom

    djsodom New Member

    I installed it manually and get this:

    Blah.
  8. mistwang

    mistwang LiteSpeed Staff

    It should work by now. looks like i386-redhat-linux-gcc is there, don't know why it does not work with the gem installation.

    Just want to remind you that you need to manually upgrade ruby-lsapi later on if there is a new release, the manually installation has higher priority than the gem installation.
  9. djsodom

    djsodom New Member

    I'm getting this now:
    My stderror.log gives this..
    ...which I read is okay.

    There are no messages in my rails logs.

    I increased my hard & soft memory to 500M each.

    I determined to make this happen.

    Steve
  10. mistwang

    mistwang LiteSpeed Staff

    I have no clue what causing it. it should be a ruby/rails internal error.
    Maybe you should check the DB configuration for the mode that rails running in. try changing it from "production" to "development" or vice versa, see if it helps.
  11. djsodom

    djsodom New Member

    Bingo. My app was set to production in its virtual host tab. Changing it to development - where a populated db exists - solved the problem.

    thanks very much for your help.

    Steve

Share This Page