More Application Errors

djsodom

Active Member
#1
I was previously thinking of migrating over to lightspeed, but kept getting application errors on certain pages. See this old post on my problems:
http://litespeedtech.com/support/forum/showthread.php?t=568&highlight=apache+error

I went back to lighttp, but decided to try litespeed again. It's a different app, but I am still getting application errors on certain pages. The page works sometimes, most of this time though it returns an application error. See:
http://www.quizical.net/create

From looking at my rails production log, it seems the db is losing its connection.

I've increased m memory allocations. Now I've got them all set to 0 as I read where that will give them as much room as they need.

I really want to use litespeed but keep running into these problems. I want to go with Litespeed because I am not a server expert, nor do I want to be, and I felt this was the most reliable choice (given the commerical nature and GUI).

Any suggestions?

Steve
blog: niblets.wordpress.com
 

mistwang

LiteSpeed Staff
#2
Looks like it only works with the first request with a fresh ruby process, DB connection was lost for some reason.
It must have something to do with the initialization of your rails application, the differences between ruby LSAPI and FCGI/mongrel is LSAPI fork children processes off parent process with initialized Rails framework, it makes some trouble with DB connection, so in RailsRunner.rb, we close the DB connection immediatedly after child process was started. It works well with most Rails applications, but somehow does not work well with your application.

Maybe you can try strace/truss/ktrace the ruby process, see what exactly happened to the DB connection.
 

djsodom

Active Member
#3
That was not the answer I was hoping for.

I just made a post last night on my blog called:
How I Set Up My EC2 Instance for Rails and Litespeed

I'd hate to go Mongrel or Liighttpd after coming this far. Its not that I have not tried. Look back at the number of posts I've done related to this topic.

Would it be possible to create a user for you on my server and have you troubleshoot it directly?

thanks,

Steve
 

mistwang

LiteSpeed Staff
#4
Sure. No problem. I may need a temp root access which is required for strace/truss/ktrace sometimes. You can PM me the info.

That probably is the best way to find out what is the problem.
 

mistwang

LiteSpeed Staff
#5
I think the problem is your DB environment, your application works properly under "Development" mode, but does not work under "Production" mode.

WEBWrick return the same error as under LiteSpeed in "Production" mode.

Have you forgotten to setup DB for "Production" environment?
 

djsodom

Active Member
#6
Thanks for checking into it. Its not my db setup. It has something to do with a serialized attribute. I haven't been able to figure out the solution yet, but I'm in the right area. thanks again.
 
Top