Timo, The mbox file /var/mail/user is NFS mounted. I've noticed the fcntl() message when the imap server is busy. In fact today at 11 AM, dovecot basically had a coronary. Nobody could authenticate, and the load on my imap server went out of sight. I got a lot of syslog messages like:
dovecot-auth[5686]: [ID 275322 user.error] PAM-KRB5 (auth): Error initializing krb5: Unknown code 24
I shut down dovecot, killed off all of its processes (hard on the users), restarted, everything ok after that.
Is there any kind of load-based control, like sendmail uses, that would reject connections if "uptime" load > N?
Jeff Earickson Colby College
On Tue, 27 Sep 2005, Timo Sirainen wrote:
Date: Tue, 27 Sep 2005 22:25:44 +0300 From: Timo Sirainen tss@iki.fi To: Jeff A. Earickson jaearick@colby.edu Cc: dovecot@dovecot.org Subject: Re: [Dovecot] 1.0alpha3: fcntl() complaints?
On Mon, 2005-09-26 at 12:55 -0400, Jeff A. Earickson wrote:
Hi,
Since installing 1.0alpha3 this morning, I've seen this syslog complaint a few times. Anything to worry about? A "server too busy" issue?
imap(user): fcntl() failed with mbox file /var/mail/user: Resource temporarily unavailable
Hmm.. I just recently changed that code to write error message if it happens. In 1.0-stable it's silently ignored. But I'm not really sure why it would happen. I don't think it should happen as long as I'm trying to lock using F_SETLKW (waiting the lock) instead of F_SETLK (try locking).
F_SETLK is used when unlocking the file. But why would unlocking fail? Or maybe it does with NFS lockd?
Linux's fcntl() man page doesn't talk about F_SETLK explicitly, but I'd think that's what it means:
EACCES or EAGAIN Operation is prohibited by locks held by other processes. Or, operation is prohibited because the file has been memory-mapped by another process.
Solaris's man page says it only happens with F_SETLK. UNIX98 says the same.
Maybe I should just change it to be ignored again.. Would be nice to know what the cause is though.