Univention Bugzilla – Bug 28464
Cyrus DB_CONFIG per UCR
Last modified: 2013-11-19 06:43:12 CET
2012091121000928, 2011050910005118 Es sollte eine Möglichkeit geben die BDB Konfiguration der Cyrus Datenbanken in UCR anzupassen: # cat /var/lib/cyrus/db/DB_CONFIG set_cachesize 0 2097152 1 set_lg_regionmax 1048576 Dort werden momentan die Standardwerte verwendet welche ziemlich niedrig angesetzt sind: # db4.7_stat -h /var/lib/cyrus/db -mgrep -i "cache size" 641KB 752B Total cache size 648KB Pool individual cache size # db4.7_stat -h /var/lib/cyrus/db -l |grep "region size" 96KB Log region size Ggf. sollten wir die Werte auch standardmäßig etwas höher ansetzen, zumindest die kleine "log region size" hat bereits bei Kunden zu Problemen geführt: -- DBERROR db4: Logging region out of memory; you may need to increase its size DBERROR: opening /var/lib/cyrus/deliver.db: Cannot allocate memory DBERROR: opening /var/lib/cyrus/deliver.db: cyrusdb error FATAL: lmtpd: unable to init duplicate delivery database -- <http://tagebuch.localwurst.de/2008/11/09/cyrus-dberror-db4-logging-region-out-of-memory/> <http://www.cjc.org/blog/archives/2006/08/22/cyrus-imap-log-and-cache-settings/>
Um die neuen Einstellungen zu übernehmen, muss ein db4.7_recover ausgeführt werden: - /etc/init.d/cyrus2.2 stop - db4.7_recover -h /var/lib/cyrus/db - /etc/init.d/cyrus2.2 start
Ich habe nun ein Template für /var/lib/cyrus/db/DB_CONFIG in univention-mail-cyrus hinzugefügt. Diese Template ist auf alle Variablen mit dem Prefix "mail/cyrus/bdb/dbconfig/" registriert und schreibt die Variablen ohne Prefix und den Wert in die DB_CONFIG. Standardwerte sind mail/cyrus/bdb/dbconfig/set_cachesize?"0 2097152 1" mail/cyrus/bdb/dbconfig/set_lg_regionmax?"2097152" Ein "db4.X_recover" ist nicht notwendig, es reicht ein Neustart des cyrus, siehe -> db4.X_stat -m -h /var/lib/cyrus/db -> db4.X_stat -l -h /var/lib/cyrus/db Es gibt einen Hinweis in den Release Notes, dass eine eventuell vorhanden DB_CONFIG beim Update auf DB_CONFIG.debian kopiert wird und dass man Variablen auch vor dem Update setzen kann, damit die neue Config dann entsprechend aussieht. QA: Update mit cyrus 2.2 Update mit cyrus 2.4 Installation mit cyrus 2.2 Installation mit cyrus 2.4
OK: existing DB_CONFIG file will be renamed to DB_CONFIG.debian (only once) OK: all UCR variables are written without prefix into DB_CONFIG OK: db4.X_recover is not required; a cyrus restart is sufficient; all values that have been set, take effect after restart of cyrus - checked via db4.X_stat (see comment above) OK: changelog / release notes (small fixes have been comitted) OK: installation of Cyrus 2.2 on UCS 3.2 OK: installation of Cyrus 2.4 on UCS 3.2 OK: update of Cyrus 2.2 from 3.1-1 to 3.2 OK: update of Cyrus 2.4 from 3.1-1 to 3.2 A typo within the UCR variable descriptions has been fixed and the package has been rebuilt: sed -i -e 's/DBD/BDB/' \ debian/univention-mail-cyrus.univention-config-registry-variables univention-mail-cyrus (6.0.4-3) unstable; urgency=low
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".