<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.8.2">
</HEAD>
<BODY>
Hi People,<BR>
<BR>
I have inherited a Cyrus IMAP server and need help to resolve some issues I'm having with it. It has basically run fine over the last 6 Months, but in the last few days the following errors have appeared<BR>
<BR>
<FONT COLOR="#000000"><I>DBERROR db4: Logging region out of memory; you may need to increase its size</I></FONT><BR>
<FONT COLOR="#000000"><I>DBERROR: opening /var/imap/deliver.db: Cannot allocate memory</I></FONT><BR>
<FONT COLOR="#000000"><I>DBERROR: opening /var/imap/deliver.db: cyrusdb error</I></FONT><BR>
<BR>
<FONT COLOR="#000000"><I>DBERROR db4: Logging region out of memory; you may need to increase its size</I></FONT><BR>
<FONT COLOR="#000000"><I>DBERROR: opening /var/imap/tls_sessions.db: Cannot allocate memory</I></FONT><BR>
<FONT COLOR="#000000"><I>DBERROR: opening /var/imap/tls_sessions.db: cyrusdb error</I></FONT><BR>
<BR>
Re-starting cyrus appears to have solved the problem for now, but in an attempt to prevent the problem re-occurring I did some research on the web. This led me to the DB_CONFIG file. In particular the setting I wanted to try were<BR>
<FONT COLOR="#000000">set_lg_regionmax 131072</FONT><BR>
<FONT COLOR="#000000">set_lg_bsize 524288 </FONT><BR>
<FONT COLOR="#000000">set_flags DB_LOG_AUTOREMOVE</FONT><BR>
<BR>
Before I made this change I ran the following commands<BR>
<BR>
<FONT COLOR="#000000">zombie ~ # db4.2_stat /var/imap/deliver.db -l</FONT><BR>
<FONT COLOR="#000000">40988 Log magic number.</FONT><BR>
<FONT COLOR="#000000">8 Log version number.</FONT><BR>
<FONT COLOR="#000000">32KB Log record cache size.</FONT><BR>
<FONT COLOR="#000000">0660 Log file mode.</FONT><BR>
<FONT COLOR="#000000">10Mb Current log file size.</FONT><BR>
<FONT COLOR="#000000"> Log bytes written.</FONT><BR>
<FONT COLOR="#000000"> Log bytes written since last checkpoint.</FONT><BR>
<FONT COLOR="#000000">0 Total log file writes.</FONT><BR>
<FONT COLOR="#000000">0 Total log file write due to overflow.</FONT><BR>
<FONT COLOR="#000000">0 Total log file flushes.</FONT><BR>
<FONT COLOR="#000000">1 Current log file number.</FONT><BR>
<FONT COLOR="#000000">28 Current log file offset.</FONT><BR>
<FONT COLOR="#000000">0 On-disk log file number.</FONT><BR>
<FONT COLOR="#000000">0 On-disk log file offset.</FONT><BR>
<FONT COLOR="#000000">0 Max commits in a log flush.</FONT><BR>
<FONT COLOR="#000000">0 Min commits in a log flush.</FONT><BR>
<FONT COLOR="#000000">96KB Log region size.</FONT><BR>
<FONT COLOR="#000000">0 The number of region locks granted after waiting.</FONT><BR>
<FONT COLOR="#000000">0 The number of region locks granted without waiting.</FONT><BR>
<BR>
<FONT COLOR="#000000">zombie ~ # db4.2_stat /var/imap/tls_sessions.db -l</FONT><BR>
<FONT COLOR="#000000">40988 Log magic number.</FONT><BR>
<FONT COLOR="#000000">8 Log version number.</FONT><BR>
<FONT COLOR="#000000">32KB Log record cache size.</FONT><BR>
<FONT COLOR="#000000">0660 Log file mode.</FONT><BR>
<FONT COLOR="#000000">10Mb Current log file size.</FONT><BR>
<FONT COLOR="#000000"> Log bytes written.</FONT><BR>
<FONT COLOR="#000000"> Log bytes written since last checkpoint.</FONT><BR>
<FONT COLOR="#000000">0 Total log file writes.</FONT><BR>
<FONT COLOR="#000000">0 Total log file write due to overflow.</FONT><BR>
<FONT COLOR="#000000">0 Total log file flushes.</FONT><BR>
<FONT COLOR="#000000">1 Current log file number.</FONT><BR>
<FONT COLOR="#000000">28 Current log file offset.</FONT><BR>
<FONT COLOR="#000000">0 On-disk log file number.</FONT><BR>
<FONT COLOR="#000000">0 On-disk log file offset.</FONT><BR>
<FONT COLOR="#000000">0 Max commits in a log flush.</FONT><BR>
<FONT COLOR="#000000">0 Min commits in a log flush.</FONT><BR>
<FONT COLOR="#000000">96KB Log region size.</FONT><BR>
<FONT COLOR="#000000">0 The number of region locks granted after waiting.</FONT><BR>
<FONT COLOR="#000000">0 The number of region locks granted without waiting.</FONT><BR>
<BR>
I then shutdown cyrus (and exim the mailer configured) and created DB_CONFIG ensuring the permissions were set to cyrus:mail. <BR>
I then ran the command<BR>
<BR>
<B> db4.2_recover -h /var/imap/ -v</B><BR>
db_recover: Finding last valid log LSN: file: 1 offset 28<BR>
<BR>
And restarted the services I had stopped. I repeated the <FONT COLOR="#000000">db4.2_stat </FONT>commands and unfortunately the output is the same. What am I missing? As it appears the DB_CONFIG file is being ignored. Once I had this issue I also tried placing DB_CONFIG in /var/imap/db and repeating the process this had no effect on the effected files either.<BR>
<BR>
My System is Gentoo packages<BR>
<BR>
dev-libs/cyrus-sasl-2.1.20 <BR>
net-mail/cyrus-imap-admin-2.2.10 <BR>
net-mail/cyrus-imapd-2.2.12 <BR>
<BR>
sys-libs/db-4.2.52_p2. <BR>
<BR>
The system supports less than 1000 mailboxes. Any help you could offer would be appreciated.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Clint Dilks
Linux Administrator
Computing & Mathematical Sciences
The University of Waikato, New Zealand
Phone : 64 7 8384536
<A HREF="http://www.scms.waikato.ac.nz/">http://www.scms.waikato.ac.nz/</A>
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>