Report this

What is the reason for this report?

clamav-daemon fails to load due to memory; any way to run clamscan on demand for attachments?

Posted on February 11, 2015
MooK

By MooK

Hi,

I’m using a 512MB Debian droplet, and I currently have about 280MB free:

| total | used | free | shared | buffers | cached ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- Mem: | 497 | 209 | 287 | 0 | 1 | 84

When I run clamav-daemon, I end up with this error:

tail -f /var/log/clamav/clamav.log Wed Feb 11 01:31:00 2015 -> clamd daemon 0.98.5 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64) Wed Feb 11 01:31:00 2015 -> Log file size limited to 10485760bytes. Wed Feb 11 01:31:00 2015 -> Reading databases from /var/lib/clamav Wed Feb 11 01:31:00 2015 -> Not loading PUA signatures. Wed Feb 11 01:31:00 2015 -> Bytecode: Security mode set to "TrustSigned". Wed Feb 11 01:31:10 2015 -> Loaded 3741717 signatures. Wed Feb 11 01:31:11 2015 -> LOCAL: Unix socket file /tmp/clamd.socket Wed Feb 11 01:31:11 2015 -> LOCAL: Setting connection queue length to 30 Wed Feb 11 01:31:11 2015 -> ERROR: daemonize() failed: Cannot allocate memory Wed Feb 11 01:31:11 2015 -> Socket file removed.

As a result, I’m guessing my droplet just isn’t powerful enough to have clamav running as a daemon all the time. So, I would prefer to have it scan on demand, once per day, and scan each attachment as it comes in. I plan to use exim4. Is this possible?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.