[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgp-keyserver-folk
Subject:    improve email sync: stop bouncing messages
From:       Jason Harris <jharris () widomaker ! com>
Date:       2003-07-30 20:28:19
[Download RAW message or body]


I've seen too many sync messages bounce in the past few months, and
particularly way too many in the past 48 hours.  Rather than trying
to process each incremental update as it comes in, I recommend _saving_
the messages first and then processing them.

This is the cron entry I use:

*  * * * * /<elided>/pks-queue-run.sh /<elided>/pksd.conf > /dev/null

for the (unprivileged) user.  The new stuff in pks-queue-run.sh is:

lockf -ks -t 0 $conf /usr/bin/true || exit 0

for file in $dir/pks-mail.*; do
        if [ -r "$file" ]; then
                lockf -ks -t 0 $dir/lock $bindir/pksdctl $socket "mail $file" || exit 0
        fi
done


where lockf(1) is a wrapper around flock(2) in FreeBSD.  Also, pks-mail.sh
no longer invokes pksdctl.

This dequeues the messages once a minute with lockf(1) first protecting
pks-queue-run.sh and then pksdctl from deadlocking if anything is hosed.
If pksd is not responding, the messages will queue instead of bouncing.
After any extended downtime, I find running large queues with as little
as a 2s delay is usually OK since most incrementals are redundant and
well-synchronized keyservers will already have the new data and won't
generate further incrementals to load their peers.

-- 
Jason Harris          | NIC:  JH329, PGP:  This _is_ PGP-signed, isn't it?
jharris@widomaker.com | web:  http://jharris.cjb.net/

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic