I've just uploaded Apache::Sybase::ConPool to CPAN - it should be visible in a day or three...

What it does is use the fact that Sybase clients connections can be shared among processes - so we use a PerlRequire directive to pre-load this module and have it open a configurable number of connections.

Then, when a script/handler runs it calls getDbh() to retrieve the first available connection, and freeDbh() to release it.

Access is synchronized with SysV semaphores.

Caveats: the connections can't be reinitialized from within apache - you have to restart the web server.

I've been using a module similar to this for about a year, and it's been working pretty well.

Michael

  • Comment on Sybase connection pooling with mod_perl

Replies are listed 'Best First'.
Re: Sybase connection pooling with mod_perl
by BigJoe (Curate) on Nov 01, 2001 at 20:50 UTC
    I am not 100% positive if this works for Sybase but doesn't Apache::DBI do the same thing? Or does your module handle multiple user connections better? Because with Apache::DBI the more unique users you have connecting using it, the more your webserver gets taxed with the overhead of keeping the connections.

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.