Hi, thanks for the tips. But I don't seem to be able to locally override the value of AutoCommit for one handle (I only need to use AutoCommit for one script!). If I follow the instructions on the URL you pointed me to, and do something like:
my $dbh = DBI->connect ("dbi:Pg:dbname=hello", "postgres", "foo"); my %orig = (); my @attrs = qw(AutoCommit RaiseError); $orig{$_} = $dbh->{$_} for @attrs; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; When I later do the $dbh->commit, it fails with this in my log file: commit ineffective with AutoCommit enabled at /usr/lib/perl5/..... So is AutoCommit disallowed for overriding (as this seems to suggest)? Regards Kirk Bowe. On Tue, 15 Oct 2002, Perrin Harkins wrote: > Kirk Bowe wrote: > > Unfortunately after a couple of hours of moderate use Postgres reaches its > > max_clients level (which is set below max httpds in httpd.conf) > > This is usually caused by mistakes in your connection calls where they > have slightly different connect info resulting in multiple connections. > > > At this point there's no > > work being done, so presumably the handles aren't being freed. > > Database handles are not supposed to be freed. That's the point of > Apache::DBI. However, you should only have one per httpd process. > > > Does anyone have any tips on how to, at this point, go about detecting > > where the handle leak might be (which I'm presuming is the problem)? > > http://perl.apache.org/docs/1.0/guide/databases.html#Debugging_Apache__DBI > > > should Template::Toolkit be avoided altogether when using mod_perl and > > database connectivity? > > TT is not related to this. It works great with mod_perl. > > - Perrin >