I am using Apache::Session::DBI in a simple cgi script with mod_perl, and in
that same cgi I make several connections to the same database that the session
info is stored.
The several connections that I make in the cgi script using DBI->connect are
using the shared DBI handle, however Apache::Session::DBI is making a new
connection and its own 'shared' database handle
how do i know this?
i am using postgres on one machine and count the number of processes that it
starts. so lets say that running ab on the test script _without_ the sessions
it might start say 90 copies of postgres this stays relatively constant no
matter how many dbi->connects i do in the script
however if i enable Apache::Session::DBI the amount of copies of postgres
jumps to about 120 (it jumps up roughtly by the number of simulaneous
connections)
does anyone have any reason's to this behaviour? or any way to force
apache::session to use the the apache::dbi handle
--
Adam Cassar
Senior Web Developer
___________________________________________
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia
that same cgi I make several connections to the same database that the session
info is stored.
The several connections that I make in the cgi script using DBI->connect are
using the shared DBI handle, however Apache::Session::DBI is making a new
connection and its own 'shared' database handle
how do i know this?
i am using postgres on one machine and count the number of processes that it
starts. so lets say that running ab on the test script _without_ the sessions
it might start say 90 copies of postgres this stays relatively constant no
matter how many dbi->connects i do in the script
however if i enable Apache::Session::DBI the amount of copies of postgres
jumps to about 120 (it jumps up roughtly by the number of simulaneous
connections)
does anyone have any reason's to this behaviour? or any way to force
apache::session to use the the apache::dbi handle
--
Adam Cassar
Senior Web Developer
___________________________________________
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia