Development and localhost

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

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

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

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

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

I'd wager that that is fairly unusual. Not sure what would cause it 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

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