[Catalyst] Connect DBIx::Class model on startup?

Daniel J. Luke dluke at geeklair.net
Fri Feb 24 21:59:48 GMT 2012


"AutoCommit only. Transactions aren't supported."

That makes it a non-starter for me, thanks for the pointer, though.

On Feb 24, 2012, at 4:31 PM, Christiaan Kras wrote:
> 
> You might want to take a look at DBD::Gofer. It supports a connection pool for reusing persistent connections.
> 
> Have a look at https://metacpan.org/module/DBD::Gofer#Connection-Pooling-and-Throttling
> 
> Op 21-02-12 19:30, Daniel J. Luke schreef:
>> Is there a canonical (or recommended) way to have my new fastcgi processes' model(s) connect to their databases on startup (instead of during the first request?)
>> 
>> I'd like to be able to avoid the extra delay on the first request each fastcgi process has while it's connecting to the DB. I think it probably belongs in my Catalyst::Model::DBIC::Schema class (maybe after BUILD ?)
>> 
>> Or maybe there's a reason why there's not an obvious hook and someone can point me to the pitfalls I'm not seeing.
>> 
>> Thanks.

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+






More information about the Catalyst mailing list