503 error after setting up for the LiteSpeed API App Definition in "External App"

Discussion in 'Ruby/Rails' started by nathanc, Jul 12, 2007.

  1. nathanc

    nathanc Well-Known Member

    I chose to instantiate a vhost from one of my VH templates.
    I did this because I wanted setup for a rails site using the
    external app. The reason I did this is because I wanted to
    test the "Memory Hard & Soft Limit" settings.

    However, I keep getting a 503 error.
    I did try increasing the Memory limits up to 500m like the documents suggests.

    I started out by removing my rails context.
    Next I added an "External App" for the LiteSpeed API
    My settings look like this:
    Name rubyLSAPI
    Address uds://tmp/lshttpd/rubyrailslsapi.sock
    Notes Not Set
    Max Connections 2
    Environment RAILS_ENV=production
    Initial Request Timeout (secs) 1M
    Retry Timeout (secs) 0
    Persistent Connection Not Set
    Connection Keepalive Timeout -1
    Response Buffering No
    Auto Start Not Set
    Command $VH_ROOT/public/dispatch.lsapi
    Back Log Not Set
    Instances 2
    Run On Start Up Not Set
    Max Idle Time 60
    Priority 1
    Memory Soft Limit (bytes) 100M
    Memory Hard Limit (bytes) 200M
    Process Soft Limit 100
    Process Hard Limit 200

    My contexts looks like this:
    URI /
    LSAPI App [VHost Level]: easybutton.us.rubyLSAPI
    Notes Not Set
    Extra Headers Not Set
    Allow Override Not Set
    Realm Not Set
    Authentication Name Not Set
    Required Not Set
    Access Allowed Not Set
    Access Denied Not Set
    Authorizer Not Set
    Add Default Charset Off

    Judging by what I read in the Step by Step,, these settings should work.

    Any red flags you see here guys?
  2. nathanc

    nathanc Well-Known Member

    Also I tried raising the "Initial Request Timeout" to like 200. After that didnt work I lowered it down to 60, which to me still seems high.
  3. mistwang

    mistwang LiteSpeed Staff

    set "Auto Start" to "on", make sure you can execute $VH_ROOT/public/dispatch.lsapi from command line.
  4. nathanc

    nathanc Well-Known Member

    Thank you for your quick reply. I figured out that I need my context URI to be /dispatch.lsapi

    Im using Mephisto by the way. The fix brings up my (non-cached)home page just fine, however when I try go to my domain/admin page, I get a 404 not found. I have the feeling I need to add something in my context, but am not sure what.
  5. mistwang

    mistwang LiteSpeed Staff

    Are you using 404 handler or the rewrite rule to dispatch the requests?
    Is there an admin directory?
  6. nathanc

    nathanc Well-Known Member

  7. mistwang

    mistwang LiteSpeed Staff

    The Rails easy configuation is a lot easier. A lot of configurations has been automated behind the scene. The end result is the same for a simple rails app setup.
    The manual configuration give you more flexibilities if you need it.

Share This Page