On 9.12.2010, at 8.24, Cor Bosman wrote:
Are the process pids also logged in the messages, so it's clear which messages belong to which imap process? If not, add %p to mail_log_prefix.
Done. It wasnt logging this, now it is.
Great. If the logs aren't too huge I could look at the raw ones, or you could try to write a script yourself to parse them. I'm basically interested in things like:
How large are the first volcs entries for processes? (= Is the initial process setup cost high?)
Find the last volcs entry for each process. Sum them up for some time period. Is the total about the same as the system's entire volcs during that time?
What kind of a volcs distribution do the processes have? A graph might be nice :)
Most importantly: Are there some commands that trigger a high increase in volcs numbers?
As I said previously, im not longer running the imap server=0 patch because it caused these errors:
Dec 9 06:54:32 userimap30 dovecot: imap(cor): Error: user cor: Initialization failed: Namespace '': mkdir(/var/spool/mail/.4a/L/0/14/corbosch) failed: Permission denied (euid=1000(cor) egid=50(staff) missing +w perm: /var/spool/mail/.4a/L/0/14, euid is not dir owner).
After I removed the patch these errors disappeared.
The patch was supposed to fix this.. Is uid 1000 wrong for this user? Didn't you already exist, why is it complaining about mkdir()?
It's very strange. Im user 'cor'. Maybe it's logging my name because I started the process (su-d to root obviously)? My uid is 1000. But im not the one doing this login, these are customer logins.
Well, that clearly says it's trying to initialize user "cor".. Is the "corbosch" directory you or someone else?
The mkdir fails because the target dir is only writable by root.
I'd have guessed that the above corbosch already existed.
Normally dovecot creates a directory as root, and chowns it to the owner it belongs to. At least, thats what I assume happens as normally this all works fine.
Uh. No.. Privileges are always dropped before Dovecot creates any directories. I don't know what creates the directories for you. I'd guess the authentication code?
Just for thoroughness ive started 2 servers with the logging patch. One with service_count=0 and one with service_count=1
What, are you saying that without the patch service imap { service_count=0 } works? Or are you talking about imap-login?
Im talking about imap-login. Currently im not running any servers with imap { service_count=0 } due to the permission errors. Im more than happy to give it another go if you feel i did something wrong.
OK. I hope the volcs logging gets us somewhere.