Error: fcntl(write-lock) locking failed
Hello, one month ago I moved my smtp and imap server to other environment with /var/vmail on NFS. After this move i have warnings about too long "Locking transaction log", but today i have errors about "fcntl(write-lock) locking failed ". What this means? This is my dovecot config:
# 2.2.9: /etc/dovecot/dovecot.conf doveconf: Warning: service auth { client_limit=1000 } is lower than required under max. load (2000) doveconf: Warning: service anvil { client_limit=1000 } is lower than required under max. load (1603) # OS: Linux 3.19.0-31-generic x86_64 Ubuntu 14.04.3 LTS nfs auth_mechanisms = plain login auth_worker_max_count = 300 default_process_limit = 400
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_plugins = zlib
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { sieve = ~/.dovecot.sieve sieve_default = /var/vmail/globalsieverc sieve_dir = ~/sieve } postmaster_address = postmaster@smtp.DOMAIN protocols = " imap lmtp sieve pop3" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0666 user = vmail } } service imap { process_limit = 1024 } ssl_cert = </etc/ssl/private/DOMAIN.crt ssl_key = </etc/ssl/private/DOMAIN.key userdb { args = uid=vmail gid=vmail home=/var/vmail/%d/%n driver = static } protocol lda { mail_plugins = zlib sieve } protocol imap { mail_max_userip_connections = 100 }
And this is errors from few day:
2015-12-14 15:33:35 1450103615 Dec 14 15:32:44 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 14 15:32:44 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail/.../Maildir/dovecot.index.log: No locks available 2015-12-14 12:36:35 1450092995 Dec 14 12:36:06 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 14 12:36:06 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail/.../Maildir/dovecot.index.log: No locks available 2015-12-14 12:18:35 1450091915 Dec 14 12:18:25 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 14 12:18:25 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail//Maildir/dovecot.index.log: No locks available Dec 14 12:18:25 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 14 12:18:25 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail/.../Maildir/dovecot.index.log: No locks available 2015-12-14 09:10:35 1450080635 Dec 14 09:10:19 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.cache: No locks available 2015-12-13 13:40:35 1450010435 Dec 13 13:40:06 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 13 13:40:06 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail/.../Maildir/dovecot.index.log: No locks available 2015-12-13 10:48:35 1450000115 Dec 13 10:48:19 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available Dec 13 10:48:19 smtp-atena dovecot: imap(...): Error: mail_index_wait_lock_fd() failed with file /var/vmail/.../Maildir/dovecot.index.log: No locks available 2015-12-12 08:36:35 1449905795 Dec 12 08:36:30 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds Dec 12 08:36:31 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 31 seconds 2015-12-12 08:35:35 1449905735 Dec 12 08:35:29 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds 2015-12-12 08:34:36 1449905676 Dec 12 08:34:27 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds 2015-12-11 11:48:36 1449830916 Dec 11 11:47:48 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds 2015-12-11 08:55:35 1449820535 Dec 11 08:55:03 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 90 seconds Dec 11 08:55:33 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 120 seconds Dec 11 08:55:33 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 120 seconds 2015-12-11 08:54:35 1449820475 Dec 11 08:54:33 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds 2015-12-11 08:53:35 1449820415 Dec 11 08:53:32 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds 2015-12-11 08:52:35 1449820355 Dec 11 08:51:59 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 90 seconds Dec 11 08:51:59 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 90 seconds 2015-12-11 08:51:35 1449820295 Dec 11 08:51:29 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds Dec 11 08:51:29 smtp-atena dovecot: imap(...): Warning: Locking transaction log file /var/vmail/.../Maildir/dovecot.index.log took 60 seconds
Op 14-12-15 om 19:39 schreef Marcin Janowski:
Hello, one month ago I moved my smtp and imap server to other environment with /var/vmail on NFS. After this move i have warnings about too long "Locking transaction log", but today i have errors about "fcntl(write-lock) locking failed ". What this means?
And this is errors from few day:
2015-12-14 15:33:35 1450103615 Dec 14 15:32:44 smtp-atena dovecot: imap(...): Error: fcntl(write-lock) locking failed for file /var/vmail/.../Maildir/dovecot.index.log: No locks available
We've had locking issues also. When I check your config I don't see any nfs specific configuration options. Please check http://wiki2.dovecot.org/NFS first. We have thought to find a solution by using dotlock in our multi Dovecot server setup, because fcntl didn't work at all on our OpenIndiana ZFS solution. We still had issues then and found out that, while we've set Dovecot to use dotlocks exclusively, it would still use fcntl sometimes. (Mail handling was slow, had to wait for lock timeouts) So now we've ended up by telling Dovecot not to use locking at all by setting "mail_nfs_storage = no" and "mail_nfs_index = no". That way it works, but when you have multiple servers handling your email, you may get issues accessing one mailbox by two or more Dovecot servers simultaneously. You should use Dovecot director to solve that problem.
Regards, Frido
participants (2)
-
Frido Otten
-
Marcin Janowski