[Dovecot] dict sql iterate failed: Not connected to database (was Re: backtrace from postgres dict)

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Wed Nov 28 12:43:23 EET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 28 Nov 2012, Steffen Kaiser wrote:

hmm, it seems to be more than just an idle timeout.

> since I enabled ACLs I get following backtrace. It looks like that it happens 
> if the ACLs had been changed only. Also, it looks like that it always happens 
> 1 minute after last "dict: Info: pgsql(localhost): Connected to database 
> dovecot", no matter if the user is logged in (and idle) or logged off. 
> Postgres logs: "could not receive data from client: Connection reset by peer" 
> and "unexpected EOF on client connection".
>
> Is there some TCP keep alive issue?
> Postgres is using the "system default" for TCP keep alive.
> I'm currently testing ACLs via telnet, so the activity with the ACL dict is 
> pretty low, hence, an idle timeout would make much sense.

When I use this script:

( echo 1 login user pass
 	sleep 1
 	echo 2 getacl Junk
 	sleep 1
 	for a in $(seq 1 ${1-4}); do
 		echo 3-$a deleteAcl Junk user2
 		sleep 30
 		echo 3-$a SetAcl Junk user2 kxilrsc
 		sleep 30
 	done
 	echo + logout
) | nc -q1 localhost 143

I get (attached are more lines of the log):

2012-11-28 11:08:07 dict: Info: pgsql(localhost): Connected to database 
dovecot
scanning for dovecot-acl
2012-11-28 11:09:07 dict: Info: pgsql(localhost): Connected to database 
dovecot
scanning for dovecot-acl
2012-11-28 11:09:37 dict: Info: pgsql(localhost): Connected to database 
dovecot
scanning for dovecot-acl
2012-11-28 11:10:07 dict: Error: dict sql iterate failed: Not connected to 
database
2012-11-28 11:10:07 IMAP(user) [23358]: Error: acl: dict iteration failed, 
can't update dict
scanning for dovecot-acl

After that the connection is broken and I get the backtrace eventually.

> # ../../sbin/dovecot --version
> 2.1.10 (a4f02f6c0d32)
>
> dict connect string:
> connect = host=localhost dbname=db user=user

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBULXqy2oxLS8a3A9mAQL4+Af+PQIzpT0/kbot90jYRYmRBA96frDlDubc
lsl9iktKGYyxLOQXRLLcUpOgzWqUvxoLtsCMlkcOG8tjyQLr2OsAufnVUL7LUH8y
iGIi8lZjfHRUQWWLgC6KG0eNOMT5PEGLB5dBcqMZxsgENjoe0SEYf3SN2bT7UxR7
N6/cbU+qnQ/IVpCCcFTtY1Nv7pHcpBwt7IQqaLTdFJ2OQBtUCFsZlkH2SArBZktC
82rHKvHkN4rsYiOhKQFyG3p7mmdmq3snUpP9fvUE+2nxsIQw2BIht8gGPMsuVoTb
DC1JjE6JGuj4z3HrEs2tYRHgnTUuUn2j28bXIp2gNDLUQzbL5DLfLQ==
=XUQP
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acl-pg-error.log.gz
Type: application/octet-stream
Size: 1139 bytes
Desc: 
URL: <http://dovecot.org/pipermail/dovecot/attachments/20121128/ee569960/attachment-0004.obj>


More information about the dovecot mailing list