**OS type and version: CentOS 7.9, MariaDB 10.4, Nginx 1.20, PHP 7.4 and 7.2
**Webmin version: 1.973
**Virtualmin version: 6.16
**Related products version: Fail2ban Server
My serrver was running just fine for the last 2 years until I added approximately 10 new websites about 2 months ago. Now, my server keeps running out of memory every couple days and needs to reboot the instance. The culprit: “/usr/bin/python2 -s /usr/bin/fail2ban-server -xf start”
But why? Any idea what is going on here?
Thanks, Julius
I have 4GB RAM / 4GB Swap. When server boots it consumes about 45% of the RAM but as days go by that goes up to 87%. The only thing using up all that extra RAM is that Fail2ban server command.
This server only has 18 sites with only 3-4 sites that each get more than 4GB bandwidth use per month. I prefer not to have a single server hold all websites. I have other instances that have about the same number of sites and monthly use but they seem to hold out okay, though!
fail2ban being large is unrelated to adding more sites. But, it can grow pretty darned large…though it’s probably not as big as you think (it uses a memory map of some sort that just looks really huge, but it’s mostly able to be swapped out without harming anything).
On a system that struggles to run fail2ban, you might consider switching to sshguard. It’s much smaller, but does less (but the most important stuff is covered).
I have removed Apache and now a reboot starts the server with only 14% usage vs 55% before. I will give it a few days to see how memory usage changes before the final verdict.
Thank you all for your help!