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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Rails app suddenly stops working. RailsRunner errors?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2007, 03:02 AM
malffred malffred is offline
Member
 
Join Date: Dec 2006
Location: Hawaii
Posts: 27
Question Rails app suddenly stops working. RailsRunner errors?

Strange, on one of my LS servers my Rails application just doesn't want to seem to work. I don't think I change anything either. When I restart the server and I tail the stderr.log I get this:

/home/bugs/www//config/boot.rb:20:in `readlines': failed to allocate memory (NoMemoryError)
from /home/bugs/www//config/boot.rb:20
from /home/bugs/www//config/environment.rb:11
from /opt/lsws/fcgi-bin/RailsRunner.rb:3


There is plenty of memory. I've also upgrade all my gems. When I run the app via mongrel with ./script/server it runs fine so this only happens under Litespeed. Its the only Rails VHost I have on this particular server, any ideas? I've checked the settings and things seem fine, but anytime I go to the url it doesn't go anywhere.

I also just updated to the latest ruby-lsapi gem, 1.13 I think?
Reply With Quote
  #2  
Old 02-02-2007, 04:15 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You may need to up the memory soft/hard limit for the ruby process under ruby tab, or the server wide CGI config under security tab.
Reply With Quote
  #3  
Old 02-02-2007, 05:38 AM
malffred malffred is offline
Member
 
Join Date: Dec 2006
Location: Hawaii
Posts: 27
Quote:
Originally Posted by mistwang View Post
You may need to up the memory soft/hard limit for the ruby process under ruby tab, or the server wide CGI config under security tab.
mistwang, thanks for the tip. I did this and the previous error went away, but a similar error came up in its place:

/usr/local/lib/site_ruby/1.8/x86_64-linux/svn/ext/core.so: libexpat.so.1: failed to map segment from shared object: Cannot allocate memory - /usr/local/lib/site_ruby/1.8/x86_64-linux/svn/ext/core.so (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
from /usr/local/lib/site_ruby/1.8/svn/error.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'
... 13 levels...
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:443:in `require_dependency'
from /home/bugs/www/config/../lib/collaboa/lib/setup.rb:15:in `run'
from /home/bugs/www//config/environment.rb:65
from /opt/lsws/fcgi-bin/RailsRunner.rb:3

Hrm, do I just not have enough memory? Even doing "free -m" shows atleast 50MB free most of the time. I have a 256MB VPS. I have 3 lsphp vhosts and this is the only rails vhost. From the above error, do you think there is something else I could adjust or is this a problem with the app itself? (though it worked fine a few days ago).

*UPDATE* I just did another test and stuck a generic rails app in there and RailsRunner ran it just fine. So I assume its a memory allocation issue or issue with the other app itself (which is just the collaboa bug tracking / source viewing rails app). If the above error gives you any clues let me know. Currently I have the rails softmem limit at 80M and the hardlimit at 120M set in the httpd_config.xml.
Reply With Quote
  #4  
Old 02-02-2007, 05:45 AM
malffred malffred is offline
Member
 
Join Date: Dec 2006
Location: Hawaii
Posts: 27
Default Fixed

After playing around with the values a bit more I seemed to have fixed it. I just needed to allocate more memory to the rails part of it (I thought 80M would be more than enough, but I guess this app prefetched all the SVN versioning info?). Thanks!
Reply With Quote
  #5  
Old 03-26-2007, 12:00 PM
fantasydreaming fantasydreaming is offline
Senior Member
 
Join Date: Sep 2006
Posts: 76
What do you mean by "prefetched SVN versioning info"?

I have a fairly large rails project, but I've been struggling with memory usage in the last while - each process shows nearly 200 megs of VSIZ, and 110 megs of RSS. They start around 94/44, but grow from there. Some requests load a thousand small objects, but it shouldn't be growing that much. I just wondered if your mention might be the clue to my problems too!
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 08:37 AM.



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