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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Rails app sooo slow :-(

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2007, 10:18 AM
Granny Smith Granny Smith is offline
Member
 
Join Date: Oct 2006
Posts: 28
Default Rails apps sooo slow :-(

Hey guys,

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
Priority: 3
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 10:24 AM.. Reason: simple change for making problem more clear
Reply With Quote
  #2  
Old 05-06-2007, 10:33 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
try the following configuration:

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.
Reply With Quote
  #3  
Old 05-06-2007, 10:52 AM
Granny Smith Granny Smith is offline
Member
 
Join Date: Oct 2006
Posts: 28
Default Thanks!

It's much faster now!
Thank you very, very much!
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 02:59 AM.



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