Re: [exim] Failed to get write lock

Top Page
Delete this message
Reply to this message
Author: Richard Pitt
Date:  
To: Mr David Robertson
CC: exim-users
Subject: Re: [exim] Failed to get write lock
In my experience this is almost always a load issue.

I've settled on putting the database in /dev/shm - i.e. RAM disk

there is no major penalty for losing this database - on reboot for
example - the system will simply rebuild it

Following is in my /etc/init.d/exim startup file (I run Red
Hat/CentOS/Fedora - YMMV)

---------------
dev_shm() {
# push the db into /dev/shm
if [ -d /dev/shm/db ]
then
        echo "using old /dev/shm/db directory"
else
  mkdir -p /dev/shm/db
  chown exim.exim /dev/shm/db
  chmod 750 /dev/shm/db
  mkdir -p /var/spool/exim
fi
cd /var/spool/exim
rm -r db
ln -s /dev/shm/db db
----------------


The dev_shm() function is called upon each startup

works for me on VERY heavily loaded systems.

richard

On Tue, 2009-02-17 at 11:46 +0000, Mr David Robertson wrote:
> Hi,
>
> I am getting multiple errors in my exim log.
>
> Failed to get write lock for /var/spool/exim/db/retry.lockfile: timed out
>
> My exim configuration is fairly simple. Exim is run with the flags -bd
> -odq so that it queues all incoming mail. I then run a cron job every
> 2mins to process the queue.
> This is a new installation running FreeBSD 7.1 on a 4 core system with
> exim 4.69_3. I have another almost identical system that is not
> producing these errors.
> Greylisting, dns failures and other defers seam to cause the error to
> start. This increases the load on the system to a point where it almost
> unusable though if left alone it does recover.
> Is there anything I can do to alleviate this problem. Googling suggests
> that many people have seen the same thing but I have yet to find a solution.
>
> Many thanks for any suggestions.
>
> David
>
>

-- 
Richard C. Pitt                 Pacific Data Capture
rcpitt@???               604-644-9265
http://blog.pacdat.net       www.pacdat.net
PGP Fingerprint: FCEF 167D 151B 64C4 3333  57F0 4F18 AF98 9F59 DD73