scorpio17 has asked for the wisdom of the Perl Monks concerning the following question:
I manage a perl-based website in a shared-hosting environment.
It's been online for several years, with no problem. The traffic is fairly low
(several hundred hits per day - maybe 4000 hits per month, max.)
My web hosting company recently upgraded the server to FreeBSD 8
(not sure what it was previously - FreeBSD 7 I guess?). With this
upgrade, I went from perl version 5.8.8 to 5.12.2. Ever since this
upgrade, I've been noticing intermittent failures. I'll occasionally get a 'server error',
but if I click 'reload' the page loads normally. This happens maybe 1% of the time.
It seems random, and is nearly impossible to reproduce. There's nothing in the error logs.
However, it appears that I may be exceeding the host's per-process memory limits.
But I don't understand why a page would load okay sometimes, but fail other times.
For a given page, the memory requirement should be the same every time, right?
Is there any tool available that might help debug which part of the script is
using the most memory? I use a lot of cpan modules. Maybe there's a bug in one
of them specific to 5.12.2, but how can I find/fix it? Has anyone else out there
ever had a similar problem?