Error message help please "Connection timed out!"

Discussion in 'Ruby/Rails' started by nathanc, Nov 29, 2007.

  1. nathanc

    nathanc Well-Known Member

    I am now seeing alot of these in the logs.] No request delivery notification has been received from LSAPI process:-2, possible run away process.] connection to [uds://tmp/lshttpd/] on request #0, error: Connection timed out!] oops! 503 Service Unavailable] No request delivery notification has been received from LSAPI process:-2, possible run away process.] connection to [uds://tmp/lshttpd/] on request #0, error: Connection timed out!

    We have been running the same server configuration for a while. about the only thing that has changed is the number of site we are hosting.

    This seems to cause uptime issues.
    Only a handful are active at any given time.

    Any suggestions on were to look?
  2. mistwang

    mistwang LiteSpeed Staff

    Since Rails framework initialization may take a while, one timeout added in LSWS might be too short, we have increased it in 3.3.1, please wait for the 3.3.1 release and see how it goes.
  3. nathanc

    nathanc Well-Known Member

    Do you have an estimate time frame on this release?
  4. mistwang

    mistwang LiteSpeed Staff

    released. :)
  5. nathanc

    nathanc Well-Known Member

    You guys are awesome!
  6. nathanc

    nathanc Well-Known Member

    ok I have upgraded to 3.3.1 but I am still getting 503 errors

    2007-12-05 08:31:02.058 [INFO] [] connection to [uds://tmp/lshttpd/] on request #0, error: Connection timed out!
    2007-12-05 08:31:02.058 [NOTICE] [] oops! 503 Service Unavailable
    2007-12-05 08:31:28.091 [INFO] [idle] connection to [uds://tmp/lshttpd/] on request #4, error: Connection reset by peer!

    any suggestions?
  7. mistwang

    mistwang LiteSpeed Staff

    The second one is normal. The first one result in 503 error is not desired.
    How often does 503 errors happen? We need more log to analyze. Please send your error.log to bug @ ... .
  8. gernot

    gernot Member

    Same problem here...

    I have the same problem. I'm running several rails apps; all the newer ones that use restful routes won't run with litespeed. They do run perfectly with mongrel and webrick. I used the easy rails configuration using the virtual host template. Please note that my older rails apps (without restful routes) do still work.

    This is what I see in the server log:

    2007-12-26 14:03:45.997 INFO [] connection to [uds://tmp/lshttpd/blog:_.sock] on request #0, error: Connection reset by peer!
    2007-12-26 14:03:45.997 NOTICE [] oops! 503 Service Unavailable

    I'm running 3.3.3 and ruby-lsapi gem 2.8 on a debian system.
    Last edited: Dec 26, 2007
  9. mistwang

    mistwang LiteSpeed Staff

    Please make sure all required gem has been installed. check stderr.log along with rails log file.

    restful routes may require ENV['INLINEDIR'] or ENV['HOME'], you should set one at least.
  10. gernot

    gernot Member

    I checked stderr.log and there were errors concerning ENV['HOME'] and ENV['INLINEDIR']:

    Define INLINEDIR or HOME in your environment and try again

    So I defined ENV['INLINEDIR'] in environments/production.rb like this:

    ENV['INLINEDIR'] = "#{RAILS_ROOT}/tmp"

    The next error I got was about permissions on .ruby-inline:

    /var/www/apps/stundenplan/tmp/.ruby_inline is insecure (40777). It may not be gr
    oup or world writable. Exiting.

    So I changed them:

    sudo chmod 750 /var/www/apps/stundenplan/tmp/.ruby_inline

    Now I'm getting strange errors in my rails log:

    Processing LessonsController#index (for at 2007-12-27 10:16:58) [GET]
    Session ID: BAh7BzoMY3NyZl9pZCIlYTVlMWI2MzI0OTdjMTkyNmU3NGU4ODFhNjJjYTQ2%0AZWUiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhh%0Ac2h7AAY6CkB1c2VkewA%3D--47e35923533f823e72d2efe36be4570ac0b5b37e
    Parameters: {"action"=>"index", "controller"=>"lessons"}

    LoadError (Expected /var/www/apps/stundenplan/app/models/lesson.rb to define Lesson):
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:249:in `load_missing_constant'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in `const_missing'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:260:in `load_missing_constant'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:469:in `const_missing'
    /app/controllers/lessons_controller.rb:6:in `index'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `sass_old_process'
    /vendor/plugins/haml/lib/sass/plugin/rails.rb:14:in `process'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'

    Rendering /var/www/apps/stundenplan/public/500.html (500 Internal Server Error)

    Please note that mongrel runs the app just fine but I'd like to use the fast ruby-lsapi
    Last edited: Dec 27, 2007
  11. mistwang

    mistwang LiteSpeed Staff

    Maybe you should set "HOME" env, exactly like the value under your ssh shell.
    Last edited: Dec 27, 2007
  12. gernot

    gernot Member

    I don't understand how that should help. Litespeed isn't running under the account I log in through ssh. It uses the recomended 'nobody' user.

    However, I tried your suggestion and it doesn't help. Looks to me like ruby-lsapi doesn't play well with restful routes. I hope you will fix this soon since I like litespeed very much and usually recommend it.

  13. mistwang

    mistwang LiteSpeed Staff

    You should run Rails as the user that you run mongrel with. If you run ruby in suEXEC mode, it should work that way.
    And set "HOME" env matches what in your ssh.

Share This Page