4103 Views 14 Replies Latest reply: Feb 15, 2008 5:56 AM by pterobyte
I'm experiencing the same problems.
To me, it appears as if ctl_cyrusdb is taking far too long to complete, so launchd is killing it. This happens repeatedly. With each new attempt, disk space vanishes until it is finally exhausted. I assume the act of killing ctl_cyrusdb does not free the memory it has allocated for itself.
Running ctl_cyrusdb manually on my machine takes about two minutes, far longer than the default 20 seconds launchd waits for.
I don't yet know why running ctl_cyrusdb takes so long, there's only a dozen mailboxes and I haven't figured out yet how to activate detailled logging of what it is waiting for.
If launchd has a default of 20 seconds, then I would assume that it's either set, or can be adjusted in the plist file for ctl_cyrusdb in /System/Library/LaunchDaemons.
It may be the size, or number of emails in the db rather than the number of accounts that's taking so long. Whoever is the default alias for the mail server may be getting all the spam.
It's gotta be something with Mail.
I've got only a small handful of users... and for a new install, the mail database is already 317 MB... with only 5Mb of Mail data store...
Spam is NOT being delivered and deleted by the users mail clients... I just don't see that much getting through.. so it must be stored on the server somewhere. I'm changing the settings to Delete Junk Mail, and notify the admin user...(me) so we'll see what happens...
I've been able to get the machine running again by adding the "-x" flag to
recover cmd="ctl_cyrusdb -r -x"
in /etc/cyrus.conf. That just bypasses the database check of course, now I have to find the cause of the problem... rebuilding the users database with mailbfr and converting all cyrus database files from Berkeley DB to Skiplist did not help.
tried the following:
stopped mail server
removed contents of /var/imap/db as per http://docs.info.apple.com/article.html?artnum=306738
did a mailbfr -f which reports fixing the db, takes a good 30mins, which I believe is good (syslog reports says reconstruct: AOD: user opts: get attributes for user: <username> failed with error: -14479 in the beginning of mailbfr execution)
it doesn't seem to help
This is odd behaviour.
You could try the following:
Stop mail services
Change the database location from /var/imap (assuming you kept defaults) to let's say /var/imapnew
Run "mailbfr -o"
Run "mailbfr -f"
Start mail services
If that doesn't help then it is not a cyrus database issue, but some underlying problem.
Update: Server magically 'healed' itself. I know how naive this must sound and believe me, I can't begin to describe how frustrated I'm feeling!
Anyway, bad thing is that this db corruption seems to repeat itself every time the mail service is rebooted, so I can't say I've found a particularly stable solution.
Thanks, this solved it!(I hope)
I did what you suggested and it turned out I had some lines missing from the imapd.conf file. I copied them over from the imapd.conf.default and the mail services are now running. I even tested with a full system restart.
Note: launchd still takes a couple of process respawns of ctl_cyrusdb before reporting 'done verifying cyrus databases' and proceeds to launch the mail services. I really hope this is normal behavior.
Once again, Pterobyte, thanks very very much!