Hello,
I've been working with the quota plugin(s) the past few days
and have
been having some real trouble. Only a few entries are
appearing in the
database, a couple more when I restarted dovecot. None of
the current
entries were being updated either.
I think I've tracked it down to somewhere in the dict
backend. I put in
a few i_info() statements and recompiled. A few queries get
through,
then it seems to try the same query about three times and
then no new
more queries at all (the i_info is right after the
allocation of the
query string). I couldn't find any errors in the log.
An strace of the dict pid shows the following loop. Dovecot
-n to follow
as well.
A quick tcpdump showed a loop something like this:
< SELECT current FROM quota WHERE ...
> 513965019
< BEGIN
< INSERT INTO quota (current, ...
< COMMIT
> ?? (error_r appears to be (null))
.. repeat ..
In all my tests it appears that the quota value being set
during the
loop is 0, but that would be the most common case anyway. An
insert
query would look like this:
INSERT INTO quota (current, path, username) VALUES (0,
'quota/storage',
'user example.com') ON DUPLICATE KEY UPDATE current =
current + 0;
Help on what to do/try next would greatly be appreciated.
Thanks,
David
$ strace -p 19816
epoll_wait(5, {{EPOLLIN, {u32=153555248, u64=153555248}},
{EPOLLIN,
{u32=153601240, u64=153601240}}, {EPOLLIN|EPOLLHUP,
{u32=153567344,
u64=153567344}}}, 29, 2147483647) = 3
gettimeofday({1185308526, 494477}, {420, 0}) = 0
read(20, "Lpriv/quota/storagen", 4044) = 20
fcntl64(9, F_SETFL, O_RDWR _NONBLOCK
) = 0
read(9, 0x9271eb8, 8192) = -1 EAGAIN
(Resource
temporarily unavailable)
fcntl64(9, F_SETFL, O_RDWR) = 0
setsockopt(9, SOL_SOCKET, SO_SNDTIMEO,
"20033411 ", 8) = 0
write(9, "l 3SELECT current FROM quota
W"..., 112) = 112
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "1 1", 4) = 4
read(9, "1", 1) = 1
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "6 2", 4) = 4
read(9,
"3def10vpopmail5quota5quota7curren"..., 54) =
54
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "1 3", 4) = 4
read(9, "376", 1) = 1
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "n 4", 4) = 4
read(9, "t582670292", 10) = 10
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "5 5", 4) = 4
read(9, "376 2 ", 5) = 5
write(20, "O582670292n", 11) = 11
read(10,
"B1nA1tpriv/quota/storaget-24324n"..., 4043) =
35
fcntl64(9, F_SETFL, O_RDWR _NONBLOCK
) = 0
read(9, 0x9271eb8, 8192) = -1 EAGAIN
(Resource
temporarily unavailable)
fcntl64(9, F_SETFL, O_RDWR) = 0
setsockopt(9, SOL_SOCKET, SO_SNDTIMEO,
"20033411 ", 8) = 0
write(9, "6 3BEGIN", 10) = 10
setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"20033411 ", 8) = 0
read(9, "7 1", 4) = 4
read(9, " |