LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > 503 error after setting up for the LiteSpeed API App Definition in "External App"

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2007, 10:22 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Default 503 error after setting up for the LiteSpeed API App Definition in "External App"

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
LSAPI_CHILDREN=10
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?
Reply With Quote
  #2  
Old 07-12-2007, 10:40 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
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.
Reply With Quote
  #3  
Old 07-12-2007, 10:40 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
set "Auto Start" to "on", make sure you can execute $VH_ROOT/public/dispatch.lsapi from command line.
Reply With Quote
  #4  
Old 07-12-2007, 10:56 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
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.
Reply With Quote
  #5  
Old 07-12-2007, 05:17 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Are you using 404 handler or the rewrite rule to dispatch the requests?
Is there an admin directory?
Reply With Quote
  #6  
Old 07-13-2007, 08:04 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Your right, I forgot to reply I figured out the problem yesterday. My rewrite rules were wrong. I didnt really understand how important the rules were till I found this blog,
http://www.mathewabonyi.com/articles...tespeed-lsapi/

Thanks again.
Reply With Quote
  #7  
Old 07-13-2007, 09:47 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:02 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.