[clamav-users] Slow reload

G.W. Haywood clamav at jubileegroup.co.uk
Wed Mar 20 16:22:52 EDT 2019

Hi there,

On Wed, 20 Mar 2019, Micah Snyder wrote:
> On 3/20/19, 10:04 AM, "clamav-users on behalf of Bowie Bailey" <clamav-users-bounces at lists.clamav.net on behalf of Bowie_Bailey at BUC.com> wrote:
>> On 3/20/2019 8:42 AM, Alessandro Vesely via clamav-users wrote:
>>> On Tue 19/Mar/2019 15:35:39 +0100 Bowie Bailey wrote:
>>>> ClamAV is taking about 2 1/2 minutes to reload its database on my mail server.  This
>>>> seems to frequently happen when we are sending an email, so the Thunderbird will time
>>>> out on the send (although the message will frequently go through anyway).
>>> The mail server should scan the message with the database at hand.
>>> A forked child can do the filtering while the parent reloads.
>>> Upon loading, the child exits and new messages will be scanned by
>>> the parent with the updated database.
>> That would be ideal, but it doesn't seem to be happening that way.  If I look at my
>> logs, I see "SelfCheck", then "Reading databases", and at that point all scanning
>> stops until the "Database correctly reloaded" message 2 1/2 minutes later.
>> Is there a setting somewhere to allow scanning to continue with the existing child
>> processes while the reload happens?
> I think Alessandro was suggesting how it could work, not how it does
> work.  Clamd doesn't work that way at present.  It has been a
> feature request for a very long time, one that I hope we can address
> sometime soon, but I don't know when.

The simplest way to achieve this right now would probably be to use
two servers for scanning, and arrange for them to update their DBs
at different times.  A simple milter with a knowledge of the update
schedule could choose which scanner to use just by checking the time.
I imagine that it wouldn't be difficult, for example, to modify the
well-known MimeDefang to do that.  It wouldn't be much more difficult
to create a milter especially for the purpose.



More information about the clamav-users mailing list