Page 1 of 1

ClamAv High memory consuption, OOm killer in action

Posted: Sat 9. Apr 2022, 12:46
by TLoF
Server operating system + version
Debian 11.3 64bit

Server virtualization technology used
Proxmox

KeyHelp version + build number
KeyHelp 22.0 (Build 2393)

Problem description / error messages
When the clamav update, the server run out of memory, and the OOm killer randomly kill something. If it is an fpm process it is not a problem, if it is a mysqld process it is a problem.

Expected result
Everything working normal

Actual result
Mysqld Killed by OOm killer

Steps to reproduce
4 GB ram, no swap, random event.

Additional information
Debian 11.3, fresh install, two sites, both run php7.3.

There is a new switch to ClamAV called ConcurrentDatabaseReload If it sets to no, it reduce the memory consuption on new updates. I suggest it will be a default, or a configurable item.
https://blog.clamav.net/2020/09/clamav- ... eased.html

Re: ClamAv High memory consuption, OOm killer in action

Posted: Sat 9. Apr 2022, 13:06
by 24unix
If you have no option to increase RAM, use a swap partition or file of at least 8 GB.

Re: ClamAv High memory consuption, OOm killer in action

Posted: Mon 11. Apr 2022, 09:50
by Alexander
Hello,

this is not an issue of KeyHelp.

By the way, you can turn ClamAV email checks off, which should save you lots of RAM.
Go to KeyHelp Admin Area -> "Configuration" -> "Email Server" -> Uncheck the "Email virus checks" checkbox

Re: ClamAv High memory consuption, OOm killer in action

Posted: Sat 16. Jul 2022, 16:39
by BasHeijermans
You can always remove the oom-killer, then the problem is gone.

Code: Select all

apt remove oomd
And remove some databases from the database-list or disable Anti-Virus.

Then your 4GB will be more then enough.