Imap process timeout to quota proxy on logout after async commit

Fernando Coelho fgmcoelho at yahoo.com.br
Mon May 18 23:40:47 UTC 2015


Hi there, I am having some trouble implementing a quota proxy server for a memcached based dict (I am using the version 2.2.15).
I created a multi-threaded daemon that is using non-blocking sockets to receive the data and reply to dovecot. Right now everything but the atomic increase message is working great. Here is an example of such a message:
B1
A1    priv/quota/storage    86583
A1    priv/quota/messages    1
D1

The program process it and I replies:OA1

Everything keeps working as expects until the user sends the imap a logout command.  The only problem is that for some reason dovecot tries to read data from server without sending anything, and after 30 seconds it exits with an timeout error. The following message is logged:
May 18 22:46:00 imap[11654]: user 29908633#perm!terra (29908633#perm!terra) from 127.0.0.1: Error: read(/tmp/quotatest) failed: Timeout after 30 seconds
May 18 22:46:00 imap[11654]: user 29908633#perm!terra (29908633#perm!terra) from 127.0.0.1: Info: Disconnected: Logged out in=40 out=827
May 18 22:46:00 imap[11654]: user 29908633#perm!terra (29908633#perm!terra) from 127.0.0.1: Error: dict quota: Quota update failed, it's now desynced

The really strange part is that it only fails if and atomic increase was sent and only when the user logs out.
I use the same pattern ("OA<transaction id>\n") to reply for other commits (such as when there is an unset followed by a set) and there is no issue.

Is there anything that I am missing?
Thanks in advance.



More information about the dovecot mailing list