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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > NoMemoryError when uploading large file

Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2009, 08:59 PM
cjwoodward@gmail.com cjwoodward@gmail.com is offline
New Member
 
Join Date: Jul 2009
Posts: 2
Default NoMemoryError when uploading large file

Hi,

When I upload a large file I get the following issue:

NoMemoryError (failed to allocate memory):
/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:193:in `quote'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:72:in `send'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:72:in `method_missing'

I am using ubuntu 9.04 but have had this issue on older version of ubuntu as well.

I am on a 256 mb slicehost account. Free -m outputs:

total used free shared buffers cached
Mem: 256 71 184 0 2 15
-/+ buffers/cache: 53 202
Swap: 511 60 451

I have changed my memory limits in both Server/Security and Server/Ruby to 256M.

Everything works fine if I start the application with mongrel and upload the file there.

If you have any ideas, please let me know?

Thanks,
Carl.
Reply With Quote
  #2  
Old 07-02-2009, 09:52 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You need to increase the memory limit under "Server"->"Rails" tab.
Reply With Quote
  #3  
Old 07-02-2009, 09:56 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Maybe you already did that. anyway, you can set it to a value higher than 256M.
check the memory usage of ruby process while you upload the file.
Reply With Quote
  #4  
Old 07-02-2009, 10:01 PM
cjwoodward@gmail.com cjwoodward@gmail.com is offline
New Member
 
Join Date: Jul 2009
Posts: 2
I have set it to 400M and its still not working. Anything else to try?
Reply With Quote
  #5  
Old 07-02-2009, 11:21 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
set "Max Connection" to "1", see if it help or not. Maybe the 256M VPS limit has been hit due to multiple "ruby" process running, each process use a lot of memory.
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 03:19 AM.



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