# Development and localhost

**URL:** <https://www.ruby-forum.com/t/development-and-localhost/72144>\
**Category:** Rails\
**Created:** [October 14, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/development-and-localhost/72144 "2006-10-14T19:18:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 14, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/1 "2006-10-14T19:18:27Z")

</div>

I’m not sure if the subject line is aptly named however I’ve noticed  
something for some time.  
It seems if I’ve been away from the app for a while, it takes  
fffffffffoooooooooorrrrrever to load a page again or refresh.  
I’ve noticed this both with Webrick and Mongrel. Once I’m back again,  
doing  
things response time is fine. Wondering why there is such a long lag  
time.  
Something in the server perhaps ?

Stuart

–

> **[Dark ambient](https://en.wikipedia.org/wiki/Dark_ambient)**
>
> Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla 
> The te...

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 14, 2006, 8:06pm UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/2 "2006-10-14T20:06:37Z")

</div>

On Oct 14, 1:16 pm, “Dark A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –[Dark ambient - Wikipedia](http://en.wikipedia.org/wiki/Dark_ambient)  
> Others have noticed similar behavior. In fact, several people have  
> been discussing this in the raleigh-rb mailing list.

To quote Ryan Daigle on this one…  
“So it appears that the solution is to make your app wildly successful  
to avoid any prolonged periods of inactivity…”

The exact cause of this is unknown (to me anyway), but it has been  
suggested that either the ruby interpreter is being swapped in from  
virtual memory or that the entire virtual OS is.

By any chance is your app on a shared host?

\_Kevin

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 14, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/3 "2006-10-14T20:14:38Z")

</div>

On 10/14/06, \_Kevin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> virtual memory or that the entire virtual OS is.
> 
> By any chance is your app on a shared host?

No it’s not in production yet or on any other server. Just running  
server

> on my machine. And although it probably doesn’t mean anything I installed  
> everything using InstantRails. My app however is on edgerails and defaults  
> to Mongrel.

Anyway, interesting information Kevin since it sounds like this goes  
beyond  
just a local issue. Curious to know if it’s ever come up on this list  
before or not and if Rails-core has addressed this issue at all ?  
Right now the lag time is significant - I’d say it’s minutes, 4-5 + ,  
which  
would be a really bad thing in production.

Stuart

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 15, 2006, 12:27am UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/4 "2006-10-15T00:27:07Z")

</div>

On 10/14/06, \_Kevin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > been discussing this in the raleigh-rb mailing list.  
> > > yet or on any other server. Just running server  
> > > which  
> > > \_Kevin  
> > > Ruby.exe was the big winner rising form 30,000K in mem usage to  
> > > 217,920  
> > > when the page finally refereshed.  
> > > Not sure if this is normal. My laptop isn’t the most powerful so that  
> > > might  
> > > be part of the problem

Stuart

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 14, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/5 "2006-10-14T20:52:43Z")

</div>

On Oct 14, 2:12 pm, “Dark A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> before or not and if Rails-core has addressed this issue at all ?  
> Right now the lag time is significant - I’d say it’s minutes, 4-5 + , which  
> would be a really bad thing in production.
> 
> Stuart

Sounds like you have other issues. The lag times I have heard  
discussed are on the order of several seconds, I think.

It might be interesting to have the task manager open when you do this  
again and then note which processes are eating up all the CPU cycles.

\_Kevin

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 15, 2006, 1:09am UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/6 "2006-10-15T01:09:09Z")

</div>

On Oct 14, 6:25 pm, “Dark A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > been discussing this in the raleigh-rb mailing list.  
> > > > yet or on any other server. Just running server  
> > > > which  
> > > > \_KevinRuby.exe was the big winner rising form 30,000K in mem usage to 217,920  
> > > > when the page finally refereshed.  
> > > > Not sure if this is normal. My laptop isn’t the most powerful so that might  
> > > > be part of the problem
> 
> Stuart

I’d wager that that is fairly unusual. Not sure what would cause it  
tho…

\_Kevin

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 15, 2006, 4:43am UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/7 "2006-10-15T04:43:30Z")

</div>

On Oct 14, 7:12 pm, “Dark A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > On 10/14/06, \_Kevin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > > > > 
> > > > > > The exact cause of this is unknown (to me anyway), but it has been  
> > > > > > everything using InstantRails. My app however is on edgerails and  
> > > > > > would be a really bad thing in production.  
> > > > > > usage to 217,920  
> > > > > > \_KevinKevin , are you saying that Ruby is taking too much memory ? I have the  
> > > > > > task manager open and it’s staying in that range.
> 
> Stuart

On my machine (an Intel Mac), my ruby process only uses about 35MB +  
about 65MB of virtual memory. Not sure how well you can compare a PC  
to a Mac in terms of memory usage, but I can’t imagine that it would be  
normal to go from 30MB to 200+ in a single call. Unless you are doing  
something like creating an entire table worth of objects in a single  
call.

\_Kevin

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [October 15, 2006, 1:15am UTC](https://www.ruby-forum.com/t/development-and-localhost/72144/8 "2006-10-15T01:15:10Z")

</div>

On 10/14/06, \_Kevin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > to avoid any prolonged periods of inactivity…"  
> > > > > on my machine. And although it probably doesn’t mean anything I  
> > > > > ,
> 
> tho…
> 
> \_Kevin

Kevin , are you saying that Ruby is taking too much memory ? I have the  
task manager open and it’s staying in that range.

Stuart
