I have many perl scripts which use dbi/dbd. The scripts themselves are not written in mod_perl, and they cannot easily be converted to mod_perl so that is not an option for me right now.
Under heavy load, performance starts to degrade. I would like to gain the benefits of a persistant database connection that Apache::DBI could provide, but am wondering how big of a task this is. The documentation for Apache::DBI make it seem transparent, as if not much work is required.
Before I bother to setup mod_perl, my question, really, is this: Can I install mod_perl and use Apache::DBI for persistant connections WITHOUT converting all of my existing scripts to run under mod_perl? Will the
DBI->Connect call in my non-mod_perl scripts just magically get forwarded to Apache::DBI where a persistant connection is being held open for me?
I would be very happy if I could just install mod_perl and Apache::DBI and start seeing things perform better without doing any other work ... :)
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.