my server is stopping completely and with the following error which are resolved when it restarts:
Out of memory: kill process 15219 (clamd) score 121 ou sacrifice child
killed process (clamd) total-vm 440996kb, anon-rss:0KB file-rss:0kb
do not understand what the error is what can be done to solve the problem
It has been suggested procedure:
You may be able to limit the memory usage by editing the script in /etc/init.d/ ClamAV and add ulimit -m amountofram, or upgrade the droplet (or add a swap file) to address this
most have not found ClamAV within /etc/init.d only the clamav-daemon and clamav-freshclam
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!
This question was answered by @ryanpq:
I believe the suggestion you received would be referring to the clamav-daemon file in /etc/init.d The other suggestions you mentioned would also help with this issue.
Heya,
To limit the memory usage of ClamAV, you can set ulimit values. Since /etc/init.d/clamav-daemon and /etc/init.d/clamav-freshclam are the relevant scripts, you can edit these to set the memory limits:
Open /etc/init.d/clamav-daemon in a text editor:
sudo nano /etc/init.d/clamav-daemon
Add the following line near the top of the script (below the #!/bin/sh line):
ulimit -m <amount_of_ram_in_kilobytes>
Replace <amount_of_ram_in_kilobytes> with the desired limit, e.g., 512000 for 500MB.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.