Alternatives to Apache::DBI?

2009-10-02 Thread Kurt Hansen
Hello, I'm wondering what techniques folks are using to get persistent database connections other than Apache::DBI. Apache::DBI has worked great, but I've treated it as a black box and so don't fully understand what it is doing in the box. That was fine, but the fact that the current version

Re: Alternatives to Apache::DBI?

2009-10-02 Thread Igor Chudov
I run 1.07 on my webserver (algebra.com) and Apache::DBI works great for me. i On Fri, Oct 2, 2009 at 11:30 AM, Kurt Hansen wrote: > Hello, > > I'm wondering what techniques folks are using to get persistent database > connections other than Apache::DBI. > > Apache::DBI has worked great, but I'

Re: Alternatives to Apache::DBI?

2009-10-02 Thread Perrin Harkins
Apache::DBI is fine. You can also use DBI->connect_cached, as long as you are careful to avoid making any database connections during server startup and install your own cleanup handler to issue a rollback on all open database handles at the end of every web request. The Apache::DBI code is very

Re: Alternatives to Apache::DBI?

2009-10-02 Thread David E. Wheeler
On Oct 2, 2009, at 9:30 AM, Kurt Hansen wrote: I'm wondering what techniques folks are using to get persistent database connections other than Apache::DBI. I plan to release a new module, DBIx::Connection, on Monday. It's based on the connection caching stuff in DBIx::Class, and also has

Re: Alternatives to Apache::DBI?

2009-10-03 Thread Perrin Harkins
On Fri, Oct 2, 2009 at 10:40 PM, David E. Wheeler wrote: > It's safe to create a connection on > startup with DBIx::Connection though, as it is careful not to cache across > fork or thread boundaries. It may be necessary to set InactiveDestroy on any handles you open during startup, even if you a

Re: Alternatives to Apache::DBI?

2009-10-03 Thread David E. Wheeler
On Oct 3, 2009, at 5:25 AM, Perrin Harkins wrote: It's safe to create a connection on startup with DBIx::Connection though, as it is careful not to cache across fork or thread boundaries. It may be necessary to set InactiveDestroy on any handles you open during startup, even if you avoid ev

Re: Alternatives to Apache::DBI?

2009-10-03 Thread Perrin Harkins
On Sat, Oct 3, 2009 at 4:56 PM, David E. Wheeler wrote: > I realized, reading this, that I should check for the Apache startup and not > cache things if it's during startup. That's useful under mod_perl, and won't > hurt anything elsewhere. I'll get that committed this weekend. That should work.

Re: Alternatives to Apache::DBI?

2009-10-03 Thread David E. Wheeler
On Oct 3, 2009, at 2:00 PM, Perrin Harkins wrote: I realized, reading this, that I should check for the Apache startup and not cache things if it's during startup. That's useful under mod_perl, and won't hurt anything elsewhere. I'll get that committed this weekend. That should work. Or y

Re: Alternatives to Apache::DBI?

2009-10-04 Thread Bill Moseley
On Fri, Oct 2, 2009 at 7:40 PM, David E. Wheeler wrote: > On Oct 2, 2009, at 9:30 AM, Kurt Hansen wrote: > > I'm wondering what techniques folks are using to get persistent database >> connections other than Apache::DBI. >> > > I plan to release a new module, DBIx::Connection, on Monday. It's bas

Re: Alternatives to Apache::DBI?

2009-10-04 Thread Fred Moyer
On Sun, Oct 4, 2009 at 10:17 AM, Bill Moseley wrote: > > On Fri, Oct 2, 2009 at 7:40 PM, David E. Wheeler > Is the history of the ping to catch connections that have been inactive for > a long period and perhaps timed out?  I've thought about only issuing the > ping if the $dbh hasn't been fetche

Re: Alternatives to Apache::DBI?

2009-10-04 Thread David E. Wheeler
On Oct 4, 2009, at 10:17 AM, Bill Moseley wrote: This looks nice. Thanks. I don't use Apache::DBI, but this will be good for general connection and transaction support. I simply use connect_cached now with { privite_pid = $$ } but that doesn't allow me to set InactiveDestroy (although I'm