[Mimedefang] Playing with -X and -P for Ticks
Steffen Kaiser
skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Tue Oct 23 03:39:33 EDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 22 Oct 2012, David F. Skoll wrote:
> You could do it that way, sure. Here's how we do it in CanIt: At the
> entry point to any function that could conceivably be a "wakeup point"
> for a slave, we make sure the DB connection is OK (and reconnect if it
I rely on DBI::connect_cached(), which is to do exactly that:
"
"connect_cached" is like "connect", except that the database handle
returned is also stored in a hash associated with the given parameters. If
another call is made to "connect_cached" with the same parameter values,
then the corresponding cached $dbh will be returned if it is still valid.
The cached database handle is replaced with a new connection if it has
been disconnected or if the "ping" method fails.
"
Unfortunately with a Postgres DB server the action to open a new
connection seem to fail once in a while. At least I have re-connect
problems, when there had been network problems between client and server.
Maybe, it always fails, when the DB demon had to be restarted (not just
reload, but a real restart). But I cannot confirm this for sure.
Kind regards,
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBUIZJtf41+pMevzVSAQKcYgf/bMPeziB4G4hQ81zn/0QW4UVrp44ux/uk
uk7J0ldBxpUhkMN4C88MvE+7BKFgjKHu3lfyyzy/pXyBwwS2W+863c12SWjHB9Pq
v98tkLEndnn0ihAQwwBeIRYHZ7o3m/ANBGM5BYoPyxN0CrMRZELh74xHJKE7+bnW
Zxy3+L3C0p6W4T5mZNUcnQyNi9Gl0uub5iExMjfcoeQTFupVqvleuBoJPRGobgrd
qRv40Z3Xb6RMoV4uu23YXyyIhnci43lVhpj5aXbDp/5FC2FumYKwlYyUO5yCzazT
0CU2pV/vcFjAxkGCAjN8IrzBGDguQu42pzOts4DpJSqF1tPId8gQfA==
=0T28
-----END PGP SIGNATURE-----
More information about the MIMEDefang
mailing list