darren at darrenduncan
Apr 5, 2011, 12:10 PM
Post #5 of 7
Joseph He wrote:
Re: Is it possible to have fastCGI keep persistent database handle?
[In reply to]
> With fastCGI, I can achieve persistent script so I can save loading time,
> but I find that I don't have persistent dbi handle? Each time the
> application runs, database also opens a fresh handle.
> Search on net, people say Apache::DBI can do the job, but I found mod_perl
> is its prerequisite.
> Is it really possible to have persistent DB handle with Perl/fastCGI? My
> environment is Windows, SQL server, Perl.
Use DBIx::Connector, http://search.cpan.org/dist/DBIx-Connector/ , which is the
best solution on CPAN for this issue. It works properly for both FastCGI and
mod_perl and anything else, taking care of any gotchas. It is also simple and
can be used with plain DBI, no ORM baggage required, or it works with ORMs too,
so either way you have a choice. -- Darren Duncan
Catalyst-dev mailing list
Catalyst-dev [at] lists