[Catalyst-dev] Is it possible to have fastCGI keep persistent database handle?

Boris G. Kolesnikov kolesnikov.boris at gmail.com
Wed Apr 6 07:23:40 GMT 2011


What's the difference with the usual DBIx? It keeps permanent
connection throught all your fastcgi process

2011/4/5 Darren Duncan <darren at darrenduncan.net>:
> Joseph He wrote:
>>
>> 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.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>



More information about the Catalyst-dev mailing list