Re: Apache::DBI (another) question

2007-03-30 Thread Clinton Gormley
On Thu, 2007-03-29 at 17:31 -0400, Jonathan Vanasco wrote: > On Mar 29, 2007, at 1:01 PM, Perrin Harkins wrote: > > > Apache::DBI handles this for you. It checks if you are connection > > during startup and does not make your connection persistent if you > > are. > > is this new-ish ( like withi

Re: Apache::DBI (another) question

2007-03-29 Thread Perrin Harkins
On 3/29/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: You're one of those people using cache_connect in dbi itself, right ? Yes, I needed something more customized than what Apache::DBI was doing. I use DBI->connect_cached and add my own automatic rollback handler. - Perrin

Re: Apache::DBI (another) question

2007-03-29 Thread Jonathan Vanasco
On Mar 29, 2007, at 5:42 PM, Perrin Harkins wrote: it used to not do that. perhaps by bug not design, but I had to get very aggressive ~2004/2005 to keep connections from caching. I haven't seen that, but I also haven't used Apache::DBI much on mod_perl 2. If you can reproduce the problem,

Re: Apache::DBI (another) question

2007-03-29 Thread Perrin Harkins
On 3/29/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: On Mar 29, 2007, at 1:01 PM, Perrin Harkins wrote: > Apache::DBI handles this for you. It checks if you are connection > during startup and does not make your connection persistent if you > are. is this new-ish ( like within a year or so

Re: Apache::DBI (another) question

2007-03-29 Thread Jonathan Vanasco
On Mar 29, 2007, at 1:01 PM, Perrin Harkins wrote: Apache::DBI handles this for you. It checks if you are connection during startup and does not make your connection persistent if you are. is this new-ish ( like within a year or so ?) it used to not do that. perhaps by bug not design, but

Re: Apache::DBI (another) question

2007-03-29 Thread Perrin Harkins
On 3/29/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: If you need to connect on startup to pull configuration vars: a- connect before using Apache::DBI - not entirely necessary, but can avoid edge cases. b- connect using an alternate connection string 'user=myapp.config' - not e

RE: Apache::DBI (another) question

2007-03-29 Thread Sagar.Shah
ere a few years ago, if you nag me I'll have a go at finding the origianl document/article. > -Original Message- > From: Helmut Zeilinger [mailto:[EMAIL PROTECTED] > Sent: 29 March 2007 16:28 > To: Jonathan Vanasco > Cc: modperl@perl.apache.org > Subject: Re: Apache

Re: Apache::DBI (another) question

2007-03-29 Thread Helmut Zeilinger
I see, i will change my strategy towards avoiding the conncetion on startup. Thank you! Helmut Jonathan Vanasco schrieb: On Mar 29, 2007, at 7:46 AM, Helmut Zeilinger wrote: $self->{'dbh'} = DBI->connect ("DBI:mysql:somedb:localhost", "root", "", {RaiseError => 1}); connecting as root?

Re: Apache::DBI (another) question

2007-03-29 Thread Jonathan Vanasco
On Mar 29, 2007, at 7:46 AM, Helmut Zeilinger wrote: $self->{'dbh'} = DBI->connect ("DBI:mysql:somedb:localhost", "root", "", {RaiseError => 1}); connecting as root? While running the server there is only one apache - mysql connection visible via "mysqladmin processlist" and not one co

RE: Apache::DBI (another) question

2007-03-29 Thread John Saylor
hi i think more traffic will create problems. as you state, you are going against an explicit warning in the docs. this is just begging for trouble. why not just let Apache::DBI manage the handles for you? that is what it is written for. also, i think mysql can handle lots of connections ...

Apache::DBI (another) question

2007-03-29 Thread Helmut Zeilinger
Hi all, Software (Apache 2.2.4, mpm prefork / 8 children, mp 2.0.3, Apache::DBI 1.06) On Apache startup i am loading a module via "startup.pl", which establishes a database (mysql) connection: [..] package SomeModule; .. sub new { my $this = shift; my $class = ref($this) || $this; m