# Memory issue

**URL:** <https://www.ruby-forum.com/t/memory-issue/118160>\
**Category:** Rails\
**Created:** [October 24, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/memory-issue/118160 "2007-10-24T12:43:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/1 "2007-10-24T12:43:47Z")

</div>

I just updated a ruby on rails application from rails 1.1.0 to 1.2.x and  
got into the following problem:  
The lighttpd memory footprint rised from 23Mb(already not loading  
actionmailer and actionwebservice) to 27Mb and since the platform on  
which the rails app must run is very very limited on memory, that is not  
acceptable.  
What would you suggest to do? Is that app bound to stay on rails 1.1.0  
to keep the memory footprint under 25Mb?

Thank you in advance,  
Emanuele R…

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 1:54pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/2 "2007-10-24T13:54:03Z")

</div>

I think you need to do what you can to remove whatever real or  
artificial  
memory limit you have. Typically, a Rails app will grow far beyond 25mb  
when under heavy use, regardless of what version you’re using. You can  
verify that yourself by hitting your application’s URL with httperf  
Rails  
1.2 does consume a bit more memory than previous versions though.

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/3 "2007-10-24T14:26:12Z")

</div>

Brian H. wrote:

> I think you need to do what you can to remove whatever real or  
> artificial  
> memory limit you have. Typically, a Rails app will grow far beyond 25mb  
> when under heavy use, regardless of what version you’re using. You can  
> verify that yourself by hitting your application’s URL with httperf  
> Rails  
> 1.2 does consume a bit more memory than previous versions though.

Thank you for your answer.  
Unfortunately the memory limit is there to stay since the app is running  
on an enbedded linux platform with only 64Mb of ram. Beside the memory  
is not going to rise much from the footprint cause only one user at a  
time is allowed and the webserver restarts automatically once a day.

Is there something else I could strip from loading as I did with  
actionwebservice and actionmailer that were not needed to lower the  
footprint?

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/4 "2007-10-24T15:37:42Z")

</div>

With memory restrictions like that you may want to consider Merb or  
Camping,  
lighter Ruby frameworks. Rails has a LOT of stuff that loads… the view  
layer is especially heavy.

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/5 "2007-10-24T14:53:13Z")

</div>

On Oct 24, 5:26 am, Emanuele R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Unfortunately the memory limit is there to stay since the app is running  
> on an enbedded linux platform with only 64Mb of ram. Beside the memory  
> is not going to rise much from the footprint cause only one user at a  
> time is allowed and the webserver restarts automatically once a day.
> 
> ## Is there something else I could strip from loading as I did with actionwebservice and actionmailer that were not needed to lower the footprint?
> 
> Posted viahttp://www.ruby-forum.com/.

i think they were asking similar questions:

[http://groups.google.com/group/rubyonrails-talk/browse\_frm/thread/5347b34338c2fda2/#](http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/5347b34338c2fda2/#)

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/6 "2007-10-24T16:15:36Z")

</div>

I figured out how to lower the memory footprint back to something  
similiar to rails  
1.1.0 by removing the not needed unicode support introduced by 1.2.0 as  
explained on the following page:

[http://slateinfo.blogs.wvu.edu/blog/2007/6/14/fix-your-encoding](http://slateinfo.blogs.wvu.edu/blog/2007/6/14/fix-your-encoding)

Anyway If someone can suggest anything else to strip from rails to  
reduce the memory footprint it would be very welcome 🙂 .

Thank you guys.

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/7 "2007-10-24T18:20:00Z")

</div>

You may want to look at [RailsExpress.blog](http://railsexpress.de/blog/) as there is quite a  
bit  
of information there on optimizing Rails.

---

<div class="post-metadata">

**Author:** ![deliak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9e8a1a/32.png) [@deliak](https://www.ruby-forum.com/u/deliak)\
**Post date:** [October 24, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/memory-issue/118160/8 "2007-10-24T15:52:33Z")

</div>

Thats not an option, but thank you anyway.
