SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=header): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_topmenu.inc' line 5

ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000416ClearOSapp-imap - IMAP and POP Serverpublic2011-12-30 02:422019-03-12 11:44
Reporterjimsngc 
Assigned To 
PrioritynormalSeveritytweakReproducibilityN/A
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000416: Tune Berkeley DB log memory and cache sizes
Description=== via a blog @ http://www.cjc.org/blog/archives/2006/08/22/cyrus-imap-log-and-cache-settings/ [^] ===

This is to address the case where Cyrus IMAP runs out of log memory. Documentation on how to do deal with this is scattered around on a number of web pages, so I thought I’d consolidate things in one place.

/var/log/maillog shows the following messages:

DBERROR db4: Logging region out of memory; you may need to increase its size

at first intermittently, and then filling the log after a day or two. At this point, the mail server basically stops working, as Sendmail’s LMTP delivery process cannot communicate with Cyrus.

The solution is to increase the memory available for the Berkeley DB logging region. While doing this, we might as well increase Cyrus’s caching region, as per the Cyrus performance FAQ:

Create a DB_CONFIG file along the lines of:

# cat /var/lib/imap/db/DB_CONFIG
set_cachesize 0 2097152 1
set_lg_regionmax 1048576

This sets the cachesize to 2MB in 1 segment (the weird syntax is described in the Berkeley DB docs), and sets the log region to 1MB. The compiled-in defaults for a Fedora system appears to be 648K and 96KB, respectively.

After the file is in place, stop cyrus, run “db_recover -h /var/lib/imap/db” and start cyrus as per this Cyrus discussion.

So, to get cache and log mem stats, we run:

# db_stat -m -h /var/lib/imap/db

and:

# db_stat -l -h /var/lib/imap/db

to verify that the settings are in effect.

Note that the db_stat and db_recover utilities are part of the db4-utils package. The path to the Cyrus BDB files (/var/lib/imap/db) is also the Fedora default, and may vary on different systems.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010991)
NickH (developer)
2019-03-12 11:44

No current or recent issues come to mind.

- Issue History
Date Modified Username Field Change
2011-12-30 02:42 user2 New Issue
2011-12-30 02:43 user2 Reporter user2 => jimsngc
2011-12-30 02:43 user2 Status new => confirmed
2019-03-12 11:44 NickH Note Added: 0010991
2019-03-12 11:44 NickH Status confirmed => closed
2019-03-12 11:44 NickH Resolution open => won't fix

SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=footer): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_footer.inc' line 7