Hi,
I been having an issue with mysql server going down regularly (once a week). In my Webmin, I’ve been seeing virtual fluctuate memory 85%-100%. I am still new virtualmin, but I did search the forum to find some answers, but not quite there for a solution.
free -m
total used free shared buff/cache available
Mem: 1993 493 392 164 1108 1187
Swap: 270 231 39
Also, I got an OOM, but for clamscan? Could this affect MySQL server?
dmesg | tail -10
[115152.924211] [22609] 1012 22609 197659 154849 1511424 1494 0 clamscan
[115152.924212] [22623] 1011 22623 4255 105 77824 0 0 clam-wrapper.pl
[115152.924213] [22624] 1011 22624 1157 17 57344 0 0 sh
[115152.924214] [22625] 1011 22625 197723 154405 1507328 2021 0 clamscan
[115152.924215] [22664] 1000 22664 125630 6618 610304 0 0 php-cgi7.2
[115152.924216] [22675] 1000 22675 106059 5874 565248 0 0 php-cgi7.2
[115152.924217] [22691] 0 22691 4630 44 77824 41 0 dovecot
[115152.924218] Out of memory: Kill process 22625 (clamscan) score 270 or sacrifice child
[115152.927690] Killed process 22625 (clamscan) total-vm:790892kB, anon-rss:617468kB, file-rss:152kB, shmem-rss:0kB
[115153.009805] oom_reaper: reaped process 22625 (clamscan), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
I had a good look at this: https://www.virtualmin.com/documentation/system/low-memory, my server is mostly configured for low memory. The only changes I made was:
-
set max_allowed_packet = 1M (mine was 16M) for mysqd.cnf
-
disable ProFTPD FTP Server since I dont’ use it.
-
What could be causing my mysql outages?
-
I am not sure how to set up more virtual memory here via virtualmin, i did browse here, but probably need a noobs guide!
-
What else should I be checking that could be related to mysql server issues?
-
Are there any optimisations for mysql that can be run that may help?
Thank you. Love virtualmin, its a great system.
stay safe