Diese Seite auf Deutsch anzeigen?

MailStore Server – When storing data on a NAS, you may see error “Unable to close database file”

ID: 13776

Summary

When you configure MailStore Server to store data on a NAS, you may intermittently get errors such as “Unable to close database file <filename>”, “Unable to open database <filename>”, and “The Master-Database in <filename> cannot be opened”.

Cause

Linux based NAS software (e.g. Samba) as well as various commercially available NAS products (including but not limited to Synology and QNAP) have a feature called “Opportunistic Locking” enabled by default, this feature can lock files temporarily which prevents MailStore from accessing the database files.

Resolution

Disable “Opportunistic Locking” in the CIFS/SMB server settings either by modifying Samba’s smb.conf file or by using the specific administration frontend of the NAS.

Also verify, that the archive folder is not being real time-scanned by an anti-virus or continuous backup or file synchronization features of your NAS as these features can cause the same error.

Additional Information

Opportunistic Locking is designed to prevent multiple users from writing to the same file at the same time, but the Linux implementation takes time to unlock the file which can cause a conflict with MailStore Server. As only MailStore Server will access MailStore’s database files this feature is not needed and therefore should be disabled for the applicable share.

This error can occur relating to MailStoreMaster.fdb or MailStoreFileGroup.fdb, and may occur intermittently, or it may only occur when performing certain operations such as “Maintain FDB files” or a Compact operation.