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?

In reply to perl cgi shared hosting memory limit problem by scorpio17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.