Problem with sql daemon

SYSTEM INFORMATION
OS type and version ubuntu 22.04
Webmin version 2021
Virtualmin version 7.7
Related packages SUGGESTED

today i have the same problem ( this is the number 3) suddenly sql server dead

virtualmin says “The full MariaDB error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111)”

and clamav died too.

ommand systemctl status mysqld give me:
× mariadb.service - MariaDB 10.6.12 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: oom-kill) since Thu 2023-08-03 19:12:18 CEST; 9min ago
Docs: man:mariadbd(8)
systemd - MariaDB Knowledge Base
Process: 900 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=KILL)
Main PID: 900 (code=killed, signal=KILL)
Status: “Taking your SQL requests now…”
CPU: 5h 10min 43.231s

Aug 02 01:57:27 mnsvr2.digiiberica.es mariadbd[900]: 2023-08-02 1:57:27 329871 [Warning] Access denied for user ‘username_here’@‘localhost’ (using password: Y>
Aug 03 19:12:18 mnsvr2.digiiberica.es systemd[1]: mariadb.service: A process of this unit has been killed by the OOM killer.
Aug 03 19:12:18 mnsvr2.digiiberica.es systemd[1]: mariadb.service: Main process exited, code=killed, status=9/KILL
Aug 03 19:12:18 mnsvr2.digiiberica.es systemd[1]: mariadb.service: Failed with result ‘oom-kill’.
Aug 03 19:12:18 mnsvr2.digiiberica.es systemd[1]: mariadb.service: Consumed 5h 10min 43.231s CPU time.
Notice: journal has been rotated since unit was started, output may be incomplete

like the last 3 time, with re.start clamavd and maria db fix the problem, but why it`s happens?
if i known aboyut this problem i can fix it, but if not , we can lost hours before to fix it
any idea?
which is relation with clam av?
tx in advance

Pd i use dmesg and i found this problems
[700785.487753] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=webmin.service,mems_allowed=0,global_oom,task_memcg=/system.slice/clamav-daemon.service,task=clamd,pid=689,uid=118
[700785.487768] Out of memory: Killed process 689 (clamd) total-vm:1631140kB, anon-rss:651484kB, file-rss:3520kB, shmem-rss:0kB, UID:118 pgtables:2792kB oom_score_adj:0
[700792.046938] mariadbd invoked oom-killer: gfp_mask=0x1100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
and
[700792.047464] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=mariadb.service,mems_allowed=0,global_oom,task_memcg=/system.slice/mariadb.service,task=mariadbd,pid=900,uid=114
[700792.047562] Out of memory: Killed process 900 (mariadbd) total-vm:2887704kB, anon-rss:338304kB, file-rss:0kB, shmem-rss:0kB, UID:114 pgtables:2624kB oom_score_adj:0
root@mnsvr2:~# ^C
ideas??

You don’t have enough memory for your configuration.

Well, ClamAV needs about 1GB of RAM in the daemon mode, and all of your memory in standalone mode (no one should ever use standalone mode at this point). So, if you don’t have 1GB to spare (you clearly don’t), you shouldn’t be using ClamAV.

tx joe, i have the same problem this morning
but i have 8g of ram ( i have 22 virtual servers)
i increased virtual to 8g ( i had 4g default swaping size in 22.04)
i need more?

I don’t know. Is it the same error?

And, 8GB is a good amount, generally speaking. So…it’s probably something is going wrong with one or more of your apps (memory leak, runaway process forking, abuse, DDoS, exploited system sending spam or doing something else nasty, etc.)

You need to actually look at your system and understand what’s happening. We can’t really guess.

Use top or htop to get an overview.

2 Likes

This looks helpful.

tx joe,i did it but honestly, i dont know what i need to find. if if monitoring my server , phisical memory never use more than 50 o 60%, i check 20 times per day, off course it is not enought. but after the “problem” i never find probes o witness about a peak of memory use

I asked if it is the same error?

If it is, then it continues to be a memory problem. If you are using the standalone ClamAV server for mail processing (you cannot do that, ClamAV is now way too big), that could explain sudden huge spikes in memory usage. But, many other things could, too.

can i know if i have using the standalone ClamAV server?, how can i modify it? if i remmeber well, i setting in initial process , but this process was a long time ago, i dont remeber

has nobody more ideas?

Checking if a service is running is part of the baggage of basic administration concepts. My advice is not to just wait for answers, but to search on the Internet, I don’t think it’s that hard to type in Google clamav systemctl check running.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.