503 errors with lsws 3.1 + rails

#1
Hi,

I was trying to use our litespeed with our application and getting following error:

Code:
2007-07-05 15:07:04.083 [DEBUG] [127.0.0.1:44148-0#ubac] HttpExtConnector::tryRecover()...
2007-07-05 15:07:04.083 [DEBUG] [127.0.0.1:44148-0#ubac] trying to recover from connection problem, attempt: #2!
2007-07-05 15:07:04.083 [DEBUG] [uds://tmp/lshttpd/ubac:_.sock] request [127.0.0.1:44148-0#ubac] is assigned with connection!
2007-07-05 15:07:04.083 [DEBUG] [127.0.0.1:44148-0#ubac] [ExtConn] reconnect()
2007-07-05 15:07:04.083 [DEBUG] [Rails:ubac:/] add child process pid: 23439
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] [ExtConn] connecting to [uds://tmp/lshttpd/ubac:_.sock]...
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] ExtConn::onWrite()
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] request header is done
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] ExtConn::continueRead()
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] Request body done!
2007-07-05 15:07:04.084 [DEBUG] [127.0.0.1:44148-0#ubac] ExtConn::suspendWrite()
2007-07-05 15:07:06.343 [DEBUG] Remove pid: 23439
2007-07-05 15:07:14.043 [DEBUG] [127.0.0.1:44148-0#ubac] No response in 10 seconds, possible dead lock, try starting a new instance.
2007-07-05 15:07:14.044 [DEBUG] [Rails:ubac:/] add child process pid: 23450
2007-07-05 15:07:16.292 [DEBUG] Remove pid: 23450
2007-07-05 15:08:04.014 [NOTICE] [127.0.0.1:44148-0#ubac] ExtConn timed out while processing.
2007-07-05 15:08:04.014 [DEBUG] [127.0.0.1:44148-0#ubac] connection to [uds://tmp/lshttpd/ubac:_.sock] on request #0, error: Connection timed out!
2007-07-05 15:08:04.014 [DEBUG] [127.0.0.1:44148-0#ubac] [ExtConn] close()
2007-07-05 15:08:04.014 [DEBUG] [uds://tmp/lshttpd/ubac:_.sock] No Request has been processed successfully through this connection, the maximum connections allowed will be reduced!
Basically i created a instance from supplied rails template and restarted lsws.

For same configuration, i tried first with a hello world rails application which works flawlessly. But when I created another instance from same template for our in house app, litespeed doesn't work. The application i am talking about is, a bit complicated in nature and uses socket connections and mutexes.

I turned on debugging and got above posted errors. Can anyone have a look and say whats wrong here?

Same application,works with mongrel. I guess there shouldn't be any issue with rails configuration and stuff.
 

mistwang

LiteSpeed Staff
#2
Please try setting "Max Conns" to 1, if it works, the problem might be the socket connection established during Rails framework initialization, you should close all socket connection at end of your environment.rb. Since LSAPI ruby fork children process off initialized parent process, the file handle of a open socket will be messed up.

If it does not work either, double check if any shell environment variable need to be set. increase memory limit if more memory is used by your application.
 
#3
It turned out, it was issue with path getting changed when my app is running within ruby-lsapi module. It was looking for a program called cronolog, which was not in path and hence the error.
 
Top