I've been having this on-going debate with a friend who hosts a site for me. This site is centered on a single Perl script that relies heavily on CGI.pm and DBI::mysql. It is not running under mod_perl, as he hasn't figured out how to get it to work properly. He hosts a few sites on some uberhardware and can't get mod_perl to work.. its beyond me. ;-)

Anyway, back to the debate we've been having. About 70% of the time the script is launched, the process goes defunct and chews up a good bit of CPU for about a second. The script times itself with Time::HiRes, prints the time, disconnects from the DB, and exits immediately. It should be giving me a fairily accurate reading, but apparently the process doesn't actually exit. Instead, it hangs around and chews up cpu. I'm not liking this very much because I know the box admin doesn't like it either. He claims its my shoddy Perl programming (hah!) I keep telling him that it is his server configuration (RH 7.1, Apache) with the lack of mod_perl that is causing issues.

I posted something similar before and was told this was a kernel error, but the reply wasn't clear as to whether my script was at fault, or how it could be fixed.

Any insight at all would be appreciated. Thanks!

In reply to Perl & CGI to cause Defunct? by Anonymous Monk

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.