Graceful handling of DB connectivity failures

From: Naresh V <nareshov_at_gmail.com>
Date: Fri, 18 Mar 2011 15:47:59 +0530

Hi,

I'm reading private keys and domain selector data from postgres via haproxy:

> SigningTable dsn:pgsql://postgres_at_5432+localhost/mailapps/table=signingtabletest?keycol=fromheader?datacol=keyname
> KeyTable dsn:pgsql://postgres_at_5432+localhost/mailapps/table=keytable?keycol=keyname?datacol=dvalue,svalue,privatekey

and on localhost:5432 I have my haproxy which balances (roundrobin)
between two read only postgres dbs.

A restart of haproxy (due to a - unrelated to opendkim - change in
haproxy.cfg) caused opendkim to fail:

> Mar 18 09:41:48 outbound-us1 opendkim[4123]: error looking up "salleh_at_domain.com" in database: Invalid handle
> Mar 18 09:41:48 outbound-us1 opendkim[4123]: 59ADF690CF2: error reading signing table
...
> Mar 18 09:46:50 outbound-us1 postfix/cleanup[10136]: warning: milter inet:localhost:8891: can't read SMFIC_EOH reply packet header: Connection timed out
> Mar 18 09:46:50 outbound-us1 postfix/cleanup[10130]: warning: milter inet:localhost:8891: can't read SMFIC_EOH reply packet header: Connection timed out
> Mar 18 09:46:50 outbound-us1 postfix/cleanup[10915]: warning: milter inet:localhost:8891: can't read SMFIC_EOH reply packet header: Connection timed out

Had to restart this as:

[root_at_outbound-us1 ~]# /etc/init.d/opendkim restart
Stopping OpenDKIM Milter: [FAILED]
Starting OpenDKIM Milter: [ OK ]

Can't opendkim-milter try to connect again?

#-(root_at_outbound-us1)-(~)-#
#-(127)> opendkim -V
opendkim: OpenDKIM Filter v2.3.0
        Compiled with OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
        SMFI_VERSION 0x1000001
        libmilter version 1.0.1
        Supported signing algorithms:
                rsa-sha1
                rsa-sha256
        Supported canonicalization algorithms:
                relaxed
                simple
        Active code options:
                USE_LUA
                USE_ODBX
                _FFR_STATS
        libopendkim 2.3.0: debug


Thanks!

-Naresh V.
Received on Fri Mar 18 2011 - 10:18:13 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:20:16 PST