On 01/25/2010 11:28 AM, Peter Stoffberg wrote:
> Hi,
>
> Please help - I am near desperation. I am trying to configure an
> Ubuntu 8.04.3 server on a Xen VPS that only has 128MB of RAM, it runs
> mysql pdns and postfix. I have tried to run clamav on it and
> everything is fine except for clamd. Is this because I have too little
> ram?
>
> I have tried the package maintainers version and have now compiled and
> installed the latest version (0.95.3) from source both result in the
> same thing. When I run clamd it just hangs, the longer I leave it the
> more likely that I have to reboot the server to be able to have an ssh
> connection to it. The fact that it has behaved the same way on
> different versions tells me it's probably a ram issue. Is there any
> other way of running an anti-virus check on this little mail server
> without running clamd?
>
> I can find nothing in the log files:
>
>
> Fri Jan 22 19:25:26 2010 -> +++ Started at Fri Jan 22 19:25:25 2010
> Fri Jan 22 19:25:26 2010 -> clamd daemon 0.95.3 (OS: linux-gnu, ARCH:
> x86_64, CPU: x86_64)
> Fri Jan 22 19:25:26 2010 -> Log file size limit disabled.
> Fri Jan 22 19:25:26 2010 -> Reading databases from /var/lib/clamav
> Fri Jan 22 19:25:26 2010 -> Not loading PUA signatures.

It didn't finish loading the database.

The databases need ~114MB, which would leave very little free memory for
the rest of the system (and clamav itself).
I think you need at least 256MB to be able to start clamd. Remember that
it also needs memory to actually scan your emails.

However ClamAV shouldn't hang when running out of memory, I think what
happens is that
programs are continuously swapped in/out to attempt to make room for
clamd, which just slows everything down.
How much swap space do you have?

Depending on what the purpose of this mail server is you may not need
all of ClamAV's DB though.
For example if you run this mail server only to receive mail for
yourself/friends/project, and you never want to receive
executables via email, you can reject all executable attachments by
adding a special signature.
Then you don't need to load the main.mdb and daily.mdb files, which
would already reduce memory usage of clamav to only 50MB.
You could further filter the databases by removing :1: ndb signatures, etc.


Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to