http://qs1969.pair.com?node_id=45787


in reply to Excessive UserAgent/Request memory usage.

I don't know how much this might help, but one trick I've used to see who is gobbling memory is to add some lines like this in strategic places: warn "About to initialize Foo::Bar\n"; sleep(8);

Then when you see this message you can quickly run ps in another window to see if the process has swollen up yet. By moving these lines around you can home in on the problem code.

I'm pretty sure there's a more elegant way of doing this, but this brute force technique has done it for me every time (so far).