WordOps / WordOps

Install and manage a high performance WordPress stack with a few keystrokes

Home Page:https://wordops.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Mysql crash log

alexlii1971 opened this issue · comments

Hello,

If Mysql crashed or killed by OOM, there will be no relevant log by wo log show mysite --mysql

The reason is that it logs at /etc/mysql/conf.d/mysqld_safe_syslog.cnf that is set in the conf file of /etc/mysql/mariadb.conf.d/50-server.cnf
Screen Shot 2023-07-02 at 12 52 18 AM

and the logs will be show only by sudo less /var/log/syslog , sample here:

Jun 27 03:48:40 SF-mysite-2 kernel: [305537.425404] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=init.scope,mems_allowed=0,global_oom,task_memcg=/system.slice/mariadb.service,task=mariadbd,pid=40975,uid=114
Jun 27 03:48:40 SF-mysite-2 kernel: [305537.425507] Out of memory: Killed process 40975 (mariadbd) total-vm:6105184kB, anon-rss:2703552kB, file-rss:0kB, shmem-rss:0kB, UID:114 pgtables:6352kB oom_score_adj:0
Jun 27 03:48:40 SF-mysite-2 systemd[1]: mariadb.service: A process of this unit has been killed by the OOM killer.
Jun 27 03:48:40 SF-mysite-2 systemd[1]: mariadb.service: Main process exited, code=killed, status=9/KILL
Jun 27 03:48:40 SF-mysite-2 systemd[1]: mariadb.service: Failed with result 'oom-kill'.
Jun 27 03:48:40 SF-mysite-2 systemd[1]: mariadb.service: Consumed 4min 13.562s CPU time.
Jun 27 03:48:43 SF-mysite-2 sm-mta[2473]: rejecting connections on daemon MTA-v4: load average: 51
Jun 27 03:48:43 SF-mysite-2 sm-mta[2473]: rejecting connections on daemon MSP-v4: load average: 51
Jun 27 03:48:58 SF-mysite-2 sm-mta[2473]: accepting connections again for daemon MTA-v4
Jun 27 03:48:58 SF-mysite-2 sm-mta[2473]: accepting connections again for daemon MSP-v4
Jun 27 03:49:06 SF-mysite-2 sendmail[42479]: unable to qualify my own domain name (SF-mysite-2) -- using short name
Jun 27 03:49:06 SF-mysite-2 sendmail[42481]: unable to qualify my own domain name (SF-mysite-2) -- using short name
Jun 27 03:49:06 SF-mysite-2 sendmail[42479]: 35R3n68X042479: from=netdata, size=46631, class=0, nrcpts=1, msgid=<202306270349.35R3n68X042479@SF-mysite-2>, relay=netdata@localhost
Jun 27 03:49:06 SF-mysite-2 sendmail[42481]: 35R3n6IO042481: from=netdata, size=46846, class=0, nrcpts=1, msgid=<202306270349.35R3n6IO042481@SF-mysite-2>, relay=netdata@localhost
Jun 27 03:49:06 SF-mysite-2 sm-mta[42569]: 35R3n6rw042569: from=<netdata@SF-mysite-2>, size=47112, class=0, nrcpts=1, msgid=<202306270349.35R3n6IO042481@SF-mysite-2>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun 27 03:49:06 SF-mysite-2 sm-mta[42568]: 35R3n6tM042568: from=<netdata@SF-mysite-2>, size=46897, class=0, nrcpts=1, msgid=<202306270349.35R3n68X042479@SF-mysite-2>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun 27 03:49:06 SF-mysite-2 sendmail[42481]: 35R3n6IO042481: to=root, ctladdr=netdata (998/999), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=76846, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (35R3n6rw042569 Message accepted for delivery)
Jun 27 03:49:06 SF-mysite-2 sendmail[42479]: 35R3n68X042479: to=root, ctladdr=netdata (998/999), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=76631, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (35R3n6tM042568 Message accepted for delivery)
Jun 27 03:49:06 SF-mysite-2 sm-mta[42571]: 35R3n6tM042568: to=<root@SF-mysite-2>, ctladdr=<netdata@SF-mysite-2> (998/999), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=77103, dsn=2.0.0, stat=Sent
Jun 27 03:49:07 SF-mysite-2 sendmail[42605]: My unqualified host name (SF-mysite-2) unknown; sleeping for retry
Jun 27 03:49:11 SF-mysite-2 systemd[1]: Started Session 538 of User root.
Jun 27 03:49:14 SF-mysite-2 sm-mta[42570]: 35R3n6rw042569: to=<root@SF-mysite-2>, ctladdr=<netdata@SF-mysite-2> (998/999), delay=00:00:08, xdelay=00:00:08, mailer=local, pri=77318, dsn=2.0.0, stat=Sent
Jun 27 03:49:30 SF-mysite-2 systemd[1]: Starting MariaDB 10.6.14 database server...
Jun 27 03:49:30 SF-mysite-2 mariadbd[42872]: 2023-06-27  3:49:30 0 [Note] Starting MariaDB 10.6.14-MariaDB-1:10.6.14+maria~ubu2204-log source revision c93754d45e5d9379e3e23d7ada1d5f21d2711f66 as process 42872

I am not sure if it possible to be set, logged, and show by the commend of 'wo log show mysite --mysql'

If yes, that would be great.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue was closed because it has been stalled for 5 days with no activity.