Brethern --

So I have just now gotten Perl 5.8, Apache 2.x, and mod_perl 2 (1.9x) installed. Sweet!

I now have persistent dB connections TRANSPARENTLY and the perl interpreter doesn't need to fire up, load my modules, and then execute my script -- don't have to touch my code at all. Rad!

But what about database connection pooling? I just started playing around with mod_perl and Apache::DBI but after scouring the Internet it looks like mod_perl/Apache::DBI doesn't handle connection pooling. Does this mean that if a 1000 users hitting the same script at the same time, the first one lucks out and the rest are queued up waiting for the dB handle to free up so that they can perform their lookups/inserts? Or am I misinterpretting what a persistent dB handle is all about.

Could someone please clear this up for me?

Is there a way to get mod_perl/Apache::DBI to hold (multiple) connections around so that users can exec the same CGI concurrently without having to wait?

I've looked at SQLRelay and it looks like it can do all this but I liked the idea of having dB handles tied to Apache so that I know that if Apache is up and running, dB connectivity should be as well.

I'm a little worried that if I went the SQLRelay way that if SQLRelay crashed/core dumped, that connectivity would be toast and applications would be worthless. Does anyone know if SQLRelay has some sort of monitor that would restart itself if it were to die. I'm sure something could be written but it's nice when it's built in.

I think I am done rambling now...

Thanks in advance,
mdog

In reply to Database Connection Pooling by mdog

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.