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

Christiaan Kras c.kras at pcc-online.net
Fri Feb 24 21:31:37 GMT 2012


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


-- =

Christiaan Kras
http://blog.htbaa.com



Op 21-02-12 19:30, Daniel J. Luke schreef:
> Is there a canonical (or recommended) way to have my new fastcgi processe=
s' model(s) connect to their databases on startup (instead of during the fi=
rst request?)
>
> I'd like to be able to avoid the extra delay on the first request each fa=
stcgi process has while it's connecting to the DB. I think it probably belo=
ngs 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
> +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D+
> | *---------------- dluke at geeklair.net ----------------* |
> | *-------------- http://www.geeklair.net -------------* |
> +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D+
> |   Opinions expressed are mine and do not necessarily   |
> |          reflect the opinions of my employer.          |
> +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D+
>
>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
k/
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120224/1e3c6=
76a/attachment.htm


More information about the Catalyst mailing list