As for bleakhouse, i went through it earlier and it seemed like quite
a bit of setup so i put it off for later. Will do it now..

On Jun 12, 1:42 pm, Ram <[email protected]> wrote:
> Hi Fred,
>
> I have a few basic questions that if you could answer, would help me
> get a better grasp of things.
>
> 1. This number, the memory usage, has to go down after fractionally
> increasing when a request is made right? So if my app is consuming 40
> MB of memory on startup, after going up a little for every request,
> ideally, it should come back down to 40MB.. right? For the record,
> thats not happening.. mem usage just keeps going higher and higher..
>
> 2. If you have ever used New Relic RPM, you would know the Physical
> Mem usage graph in there.. its mem usage against time.. Im guessing it
> shold be close to constant? Mine is all over the place.. it spikes, it
> breaks, it falls and it levels.. i really dont understand why it
> breaks altogether! or any of the others.. your thoughts?
>
> 3. The way to go about diagnosing this is overloading every action one
> by one? I used Apache Benchmark once to do this to our homepage. Is
> that good enough? What should i be looking for when im looking for the
> leak?
>
> 4. As for class variables, the only ones I use are @@per_page for the
> will_paginate gem used for pagination. Besides this, there are a few
> in the plugins. my sessions hash carries way too little to be causing
> this. Besides, i clear it regularly. Any thoughts?
>
> 5. Should i be worried about the number of instances of my app that
> ive configured mod_rails to serve? I dont quite remember how many that
> was and dunno where to change it. Just vaguely seemed like something
> that could be related to the problem at hand.
>
> Hope you can guide me here. I have little to no idea about these
> things and could really use an experienced one guiding me.. thanks!
>
> On Jun 12, 1:21 pm, Frederick Cheung <[email protected]>
> wrote:
>
> > On Jun 12, 7:35 am, Ram <[email protected]> wrote:
>
> > > Hi all,
>
> > > I have an ROR application thats been running on the production server
> > > for almost a couple of months now. Everything seemed fine but the past
> > > few days have caused worry. The whole server slows down drastically
> > > and comes to a halt suddenly and it requires a reboot for the apps i
> > > have on the server to start being responsive again.
>
> > > Memory leak?
>
> > > I installed binarylogic's memory 
> > > logichttp://github.com/binarylogic/memorylogic/tree/master
> > > which shows me memory usage on every line of my log along with the
> > > PID. I can see that the memory usage keeps going higher with every
> > > request on my local dev machine.
> > > Does that mean ive got a memory leak? How do i diagnose this? I have
> > > no experience with this and im not even sure what a bad number is when
> > > i see one in terms of memory usage.
>
> > > For information's sake, when i start the app up locally, mem starts at
> > > around 46700 and keeps going up by about 400 with every request on
> > > average. How can i interpret this data? Anyone used memory logic
> > > before?
>
> > That's probably a bad thing. You need to start digging deeper: every
> > request or only some requests ? Run some tests that hit a certain
> > action 1000 times running: can you narrow it down to a single action
> > (or set of actions) ? Can you remove the leak by disabling bits of
> > functionality or commenting out code ? Keep narrowing  it down until
> > you have your culprit. You may find a tool like bleak house (http://
> > blog.evanweaver.com/articles/2007/05/06/leak-proof-direct-heap-
> > instrumentation-for-bleak_house/) is usefull too: these things can
> > tell you what objects are being leaked which may help you find the
> > problem too.
>
> > Lastly, watch out for things which naturally survive between requests:
> > class variables etc.
>
> > Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to