As others have pointed out, you can't really share DBI handles between processes. The easiest thing to do by far would be to spend a few dollars on more RAM for your database server and keep on using lots of connections. However, if you really need to limit your connections you can use DBD::Proxy for this. It's slow, but it works.
Another approach is to use Apache/mod_perl as an application server, putting your core code in there and calling it from clients via SOAP or RPC-XML. This would let you limit the number of connections at any given time by controlling the number of Apache processes, but it also means a significant re-write of your code.
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.