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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sybase connection pooling with mod_perl
by BigJoe (Curate) on Nov 01, 2001 at 20:50 UTC |