# Increasing Memory Usage

**URL:** <https://www.ruby-forum.com/t/increasing-memory-usage/226120>\
**Category:** IronRuby\
**Created:** [December 14, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120 "2010-12-14T12:25:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 14, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/1 "2010-12-14T12:25:27Z")

</div>

Hi,

I’m currently running a very simple rails (2.3.8) app using ironruby  
1.0. At the moment I’m only running the app in development mode using  
Webrick but I have some concerns about the amount of memory being used  
by ir.exe. Each web page refresh consumes an additional 5 Mb of memory  
which seems to be never released (the actually number seems to increase  
with the amount of info being retrieved/displayed). Eventually my PC  
(XP 32-bit) runs out of memeory and WeBrick needs to be restarted.

I’d like to know whether this is normal and whether this will continue  
if I move to IIS rather than WeBrick. Or could this be a result of my  
incompotence in configuring and coding my app! Any other insights would  
be gratefully appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 14, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/2 "2010-12-14T14:49:59Z")

</div>

Hi James,

can you try (not during development, just for a test) do the same test  
but  
run webrick with a production RAILS\_ENV ?

For Rails 2.3.8 this should be:

script/server -e production

Most of the time (most, not all 🙂 this is related to the development  
auto-reloading feature.

hth,

– Thibaut

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 14, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/3 "2010-12-14T15:15:47Z")

</div>

Thibaut,  
Thanks for the reply. I was wondering whether that was the case.  
I’ve tried starting in production but get the following error…

C:/ruby\_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/dependencies.rb:154:in  
`require': no such file to load -- activesp (MissingSourceFile) from C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in`require’  
from  
C:/ruby\_iron/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:30:in  
`require' from C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:154:in`require’  
from  
C:/ruby\_iron/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:30:in  
`require' from C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in`require’  
from  
C:/ruby\_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/dependencies.rb:156:in  
`require' from C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:490:in`new\_constants\_in’  
from  
C:/ruby\_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/dependencies.rb:154:in  
`require’

Any ideas?  
Thanks

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 14, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/4 "2010-12-14T16:22:28Z")

</div>

> 

C:/ruby\_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/dependencies.rb:154:in

> `require’: no such file to load – activesp (MissingSourceFile)
> 
> Any ideas?

Well you I’d guess you’re trying to use the activesp gem (  
[http://www.xaop.com/labs/activesp](http://www.xaop.com/labs/activesp)) ?

If so it’s apparently not available; not sure if it’s related to  
ironruby or  
not at this point (it could, but maybe not).

– Thibaut

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 14, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/5 "2010-12-14T17:32:55Z")

</div>

Duh! Thanks Thibaut  
I was reading activesp as active\_support. Having one of those days.  
I’d left a reference to activesp in from a previous attempt to integrate  
with Sharepoint (not very succesfully - hence the move to ironruby)

I’ve now got ironruby running in production and my initial tests show  
that whilst the memory usage does increase with usage, it does seem to  
top out, and then stop increasing (and even descreases) and is no longer  
impacting the performance as it was when running in development mode.

Thanks for your all your help.

James

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 15, 2010, 10:09am UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/6 "2010-12-15T10:09:48Z")

</div>

On 15/12/2010, at 5:32 AM, James J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve now got ironruby running in production and my initial tests show  
> that whilst the memory usage does increase with usage, it does seem to  
> top out, and then stop increasing (and even descreases) and is no longer  
> impacting the performance as it was when running in development mode.
> 
> * * *

The clr likes to use memory if it’s free. I’ve seen several distinct Wpf  
and server apps climb steadily over periods as long as half an hour  
before eventually leveling out around 220 Meg… I think that’s just  
normal 🙂

---

<div class="post-metadata">

**Author:** ![mode](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@mode](https://www.ruby-forum.com/u/mode)\
**Post date:** [December 15, 2010, 10:58am UTC](https://www.ruby-forum.com/t/increasing-memory-usage/226120/7 "2010-12-15T10:58:06Z")

</div>

> Thanks for your all your help.

Glad it worked out 🙂 Keep us posted on your success!

– Thibaut
