I had similar problems with Apache and Oracle 8i on Linux. What I experienced was that Oracle was mysteriously hanging onto open database cursors which would cause a process to chew up CPU time. Looks like it was a problem with my version of Oracle. At any rate, I had to resort to writing a script to wake up every few minutes and kill the offending process. Not an ideal solution, I know.
To ensure that this is not happening to you, I advise to to close your database cursors, to undef them, and to do a disconnect at the end of processing just to reduce the chances that your code is causing the problem.
However, the bigger issue is that your buddy really needs to get mod_perl working. If your friend is on RH7, he needs to make sure to install mod_perl version 1.2.4 or better (the one distributed with RH7 had problems).
The benefit to installing mod_perl as I understand it is that it performs a task known as "connection pooling" for your database connections. Rather than actually connecting to the database when you say $dbh->connect(), mod_perl keeps a certain number of connections alive at all times so that you don't have to waste valuable time on the connect. You won't have to modify your code after mod_perl is in place, so go on, punch your buddy in the teeth and tell him to install mod_perl.
and I like chicken.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.