RE: Lookup Error with PostgreSQL backened in SigningTable

From: Murray S. Kucherawy <>
Date: Tue, 14 Sep 2010 10:58:45 -0700

> -----Original Message-----
> From: [mailto:opendkim-users-
>] On Behalf Of Naresh V
> Sent: Tuesday, September 14, 2010 3:02 AM
> To:
> Cc: Murray S. Kucherawy
> Subject: Lookup Error with PostgreSQL backened in SigningTable
> With version 2.1.3, I'm getting the following error when I use
> opendkim (in signing mode) in a non-trivial testbed[*]:
> Sep 9 16:10:25 outbound-us1 opendkim[29941]: error looking up
> "" in database: another command is already in
> progress
> Sep 9 16:10:25 outbound-us1 opendkim[29941]: 16CAC1EBE787: error
> reading signing table
> Sep 9 16:10:25 outbound-us1 postfix/cleanup[27173]: 16CAC1EBE787:
> milter-reject: END-OF-MESSAGE from $HOST[$IP]: 4.7.1 Service
> unavailable - try again later; from=<$email> to=<$email> proto=SMTP
> helo=<$HOST>
> [*] Steps to reproduce:
> 1. setup a postgresql based signingtable and keytable
> 2. test with a lot of emails hitting your MTA.
> Initially, mails will sign just fine, but once you start seeing this
> in the maillogs, the errors continue to log as if it were due a
> 'domino effect'.
> (maybe unrelated:
> might have to use the OpenDBX API in an appropriate way to handle
> postgres perhaps?
> Also, opendbx-1.4.5/test/odbx-regression.c might be of help)

We do the "read until NULL" thing already, but your high volume might have identified a concurrency problem. Multiple threads trying to access the DB at the same time do share a DB handle. We may have to establish a lock so that a query has to complete before a new one starts.

Unfortunately I test with MySQL and don't have a second server with which to try it on PostgreSQL. Are you able to test a patch to the source code, or would you need an RPM?
Received on Tue Sep 14 2010 - 17:58:54 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:19:48 PST