[Dovecot] cannot update mailbox - unable to lock for exclusive access

Stan Hoeppner stan at hardwarefreak.com
Fri Nov 23 22:59:31 EET 2012


On 11/23/2012 5:36 AM, 1st WebDesigns wrote:

> No they are not on NFS storage, the mailboxes are stored on the local
> filesystem.

Ok, good.

> Thank you I will try this.  I did read that when using Postfix and
> Dovecot, both systems should use a matching locking mechanism, which I
> had already tried.  However, I hadn't tried just dotlock, only FCNTL and
> a combination of FCNTL and dotlock.

Since you're now using Dovecot LDA the locking mech may not make much if
any difference, but it's worth trying.

> Yes it completely eliminates the errors.  If a pop3 connection has the
> lock, the mail simply sits there and is eventually delivered in (less
> than) 600 seconds.  Whereas before, it would get deferred.  When
> re-delivery was attempted, it's possible that the box would be locked
> again, and the mail would get deferred again, leading to a delay of
> several hours on a busy day.

So this is a step in the right direction.  But still far less than
optimal.  The read/write lock contention on mbox is unnecessarily eating
up system resources (mainly memory), and causing unnecessary delivery
delays to the mailbox.  You should really start looking at migrating to
maildir.  It's not that difficult (though maybe more so with 1.0.7) if
you don't have a ton of mailboxes, and especially with POP since the
mailboxes typically wont be holding much mail to migrate.  How many do
you have?

> Our server is with Rackspace, and RHEL5 is the OS they offered us as an
> upgrade path from RHEL4.  So they're getting the support from Red Hat
> and we're getting the support from Rackspace.

The plot thickens again.  You're using a rented server.  Sigh...

This entire thread could have been greatly shortened, saving all of us
much time, if you'd have given all these details up front.

Is this a cloud server (shared host), or a dedicated server?

FWIW, you don't have RHEL5, but CentOS 5.  Hosting companies don't pay
for RHEL licenses for 10s of thousands of hosts.

I have a few salient recommendations for you:

1.  Migrate to maildir.  It is far more appropriate for a POP workload.
2.  Switch to a hosting provider that offers much more recent software.
3.  Or, get a colo server so you can use whatever software you wish.

Finally, if this email service you're providing isn't all that critical
to you or your organization, simply prod along as you have been,
fighting these problems frequently along the way.

-- 
Stan




More information about the dovecot mailing list