In situations where either a server has run out of storage, a btree database can become corrupted. I see this evidenced in the following manner, specifically "no cursor":

Nov 14 20:10:44 web2 postfix/tlsmgr[1269730]: warning: dict_proxy_sequence: 
service proxywrite: Application error
Nov 14 20:10:44 web2 postfix/postscreen[1377623]: warning: dict_proxy_lookup: 
service proxywrite: Connection reset by peer
Nov 14 20:10:44 web2 postfix/master[2514]: warning: process 
/usr/libexec/postfix/proxymap pid 1378868 killed by signal 6
Nov 14 20:10:45 web2 postfix/proxymap[1378875]: panic: dict_db_sequence: no 
cursor
Nov 14 20:10:46 web2 postfix/postscreen[1377623]: warning: dict_proxy_lookup: 
service proxywrite: Connection reset by peer
Nov 14 20:10:46 web2 postfix/tlsmgr[1269730]: warning: dict_proxy_sequence: 
service proxywrite: Application error
Nov 14 20:10:46 web2 postfix/master[2514]: warning: process 
/usr/libexec/postfix/proxymap pid 1378875 killed by signal 6
Nov 14 20:10:46 web2 postfix/master[2514]: warning: 
/usr/libexec/postfix/proxymap: bad command startup -- throttling
Nov 14 20:10:50 web2 postfix/master[2514]: warning: master_wakeup_timer_event: 
service tlsmgr(private/tlsmgr): Resource temporarily unavailable
Nov 14 20:10:52 web2 postfix/postscreen[1377623]: fatal: watchdog timeout
Nov 14 20:10:53 web2 postfix/master[2514]: warning: process 
/usr/libexec/postfix/postscreen pid 1377623 exit status 1

Postfix version: 3.7.11
libdb: 5.3.28-42.el8_4
smtpd_tls_session_cache_database = proxy:btree:$data_directory/smtpd_scache

Removing the .db cache in /var/lib/postfix followed by a restart resolves this. I've got a few potential options to consider:

- Switch from Berkeley to LMDB or SDBM. Production servers that I have limited visibility over, any pitfalls encountered for those using either? - rsyslog filter to remove corrupted files, restart Postfix. mail channel is already noisy, so would like to minimize burnt CPU cycles on filters. - Add an ExecStartPre directive to remove these files on service restart. Loss of cache on service restart but can perform connectivity checks to make sure they're operational. - Add a tmpfiles rule to remove files on boot. Similar to previous option, better job preserving cache across service restarts. Expects someone will reboot a server when it hits storage limits, unreliable expectation.

I'm leaning toward LMDB specifically. Advice?

- Matt
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to