I'm running Rails with Ruby LSAPI for a while and it's sooo slow.
I'm not sure if it's Litespeed or the LSAPI making it so slow. But I don't have any idea. Maybe you have.
Watch elmarnass.de to get an impression.
It takes some seconds before anything happens and then it's fast.
And the homepage is static! - Just an action without any database use.
Here are some things I think they might be good to know to solve my problem:
It's a virtual server with
128 MB RAM (512 dynamically)
SUSE 9.3 with Plesk 8.0.1 and Virtuozzo
Together with the other sites hosted there it are just some visitors a day. Never more than 100 (I think) and it's quite impossible that there are some visitors at the same time. So the hardware should be more than good enough, right?
My Rails settings in LiteSpeed:
Ruby Path: /usr/local/bin/ruby
Rails Environment: Production
Max Connections: 50
Environment: Not Set
Initial Request Timeout (secs): 60
Retry Timeout (secs): 0
Connection Keepalive Timeout: 60
Response Bufferring: No
Back Log: 50
Run On Start Up: Yes
Max Idle Time: 300
Memory Soft Limit (bytes): 150M
Memory Hard Limit (bytes): 200M
Process Soft Limit: 100
Process Hard Limit: 100
What else could help to make my Rails apps faster?
(Simple HTML vHosts are really fast, btw.)
Last edited by Granny Smith; 05-06-2007 at 11:24 AM..
Reason: simple change for making problem more clear
Max Connections: 2 (maybe 3 is ok)
Connection Keepalive Timeout: not set
Max Idle Time: not set
Since you set Max Idle time, the ruby process will be stopped if idle for a while, when a new request comes in, it will take a lot effort to initialize the framework again, 128MB is too small for Rails hosts.