alierak: (Default)
alierak ([personal profile] alierak) wrote in [site community profile] dw_dev2013-07-06 07:33 pm
Entry tags:

Memory leak heads up

Anyone remember when we deployed some servers with Perl 5.10.0 and saw all sorts of problems with memory usage due to a memory leak in map? I ended up drastically reducing the number of requests each Apache process would handle before it exits, [staff profile] mark and I set up various cron jobs that would unceremoniously kill off workers every so often, etc. As we upgraded and phased out older servers, I think it was no longer a problem (e.g., web08 had Perl 5.10.1).

Well, it's looking like there's another Perl memory leak on the newest group of servers. They're running 5.14.2, and things like synsuck and resolve-extacct (really?) are using several gigs of RAM after a few days. I've set up an array of lovely new worker-restarting cron jobs, and I think this is the relevant Perl bug: perl: memory leak in Encode::decode. It is likely that we'll be able to patch this in production.

I guess if you have a choice, just skip to 5.14.4.
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2013-07-07 04:59 am (UTC)(link)
I don't know if 2.51 is acceptable, but I think that would probably fix it if this is the source of our problem. We could try rolling it out on admin01 and then run a local synsuck for a few days and see if a) it has problems and b) if it fixes the memory leak?
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2013-07-07 09:02 pm (UTC)(link)

FWIW, I did upgrade my hack last night to use 2.51 with the proposed cpanm flow, and it seems to work. Granted, I don't have syndicated feeds so it's not a great test... but the web site itself seems to work and not explode.

mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2013-07-08 08:47 pm (UTC)(link)

Okay, I'm rolling Encode 2.51 it out to the rest of the servers (sync-dw-home2) and restarting things. I'll keep an eye on the error logs and make sure things look happy.