Centos – Why doesn’t the Clam antivirus daemon start with a Cannot Allocate Memory Error

centosclamav

/etc/init.d/clamd start

Error:

[FAILED] log gives ERROR: daemonize() failed: Cannot Allocate Memory

On Cent OS

total Mem: 510876kb

/etc/init.d/clamd start

in /var/log/clamav

ERROR: daemonize() failed: Cannot Allocate Memory?

Is this a problem that can be solved?

I thought Clamd only needed 20 - 40 mb

Says Memory Free: 273844k

Results of strace:

waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 1658
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, 0xbff84a2c, WNOHANG)        = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
rt_sigaction(SIGINT, {SIG_DFL, [], 0}, {0x80810f0, [], 0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
read(255, "", 1694)                     = 0
exit_group(1)                           = ?

Results of strace -f:

strace -f -o /tmp/clamd.txt service clamd start

is pretty much the same, am I looking for some kind of error?

Best Answer

I've experienced the same problem, and found that saslauthd used a lot of memory, as this guy.

The problem might be a memory leak with a possible fix being described here: https://www.howtoforge.com/community/threads/saslauthd-memory-leak-fix.52750/

Tried the fix, but I'm not able to confirm it, as the problem (if still existent) will not arise within a few weeks from now.

Related Topic