On Wed, 1 Jul 2009, Paul van der Vlis wrote: > Hello! > > I have errors in my log, and sometimes Cyrus crashes and I have to > reboot the server because restarting gives this error: > > mail:~# /etc/init.d/cyrus2.2 restart > Stopping Cyrus IMAPd: cyrmaster. > Waiting for complete shutdown........ > fatal: incomplete shutdown detected, aborting. > > In the log I see all the time errors like: > ------ > Jul 1 10:35:27 mail cyrus/imap[16841]: DBERROR db4: Database handles > open during environment close > Jul 1 10:35:27 mail cyrus/imap[16841]: DBERROR: error exiting > application: Invalid argument > ------ > > When Cyrus stops working I see this in the logs: > ------- > Jul 1 10:40:04 mail cyrus/imap[16920]: DBERROR db4: Logging region out > of memory; you may need to increase its size > Jul 1 10:40:04 mail cyrus/imap[16920]: DBERROR: opening > /var/lib/cyrus/tls_sessions.db: Cannot allocate memory > Jul 1 10:40:04 mail cyrus/imap[16920]: DBERROR: opening > /var/lib/cyrus/tls_sessions.db: cyrusdb error > --------- > > I am not sure what's the problem here. > > Do I need to increase the memory size of the Berkeley database? > and where can I do that? > > Can I remove /var/lib/cyrus/tls_sessions.db? > (I have the same problem with deliver.db.) > > What will be that "Databases handles open during environment close", can > that give this problem? Here's what I recommend - get rid of Berkeley DB in Cyrus and use skiplist instead. :) Change your backend database formats to skiplist in imapd.conf, something like: # Backend database formats to use annotation_db: skiplist duplicate_db: skiplist mboxlist_db: skiplist quota_db: quotalegacy seenstate_db: skiplist statuscache_db: skiplist subscription_db: flat tlscache_db: skiplist A lot of us got tired of messing around with Berkeley DB and switched to skiplist. If you decide to change formats, make sure you stop Cyrus and remove the contents of the {configdirectory}/db/ directory. You'll also want to delete the deliver.db and tls_sessions.db files, assuming those are the ones you change. tls_sessions.db does not contain any information that needs to persist between Cyrus restarts. deliver.db contains duplicate messsage suppression information and is also used for vacation reply tracking. The worst that will happen if you delete deliver.db is that someone may get a second vacation reply message sent out. Andy ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html