我在单核 1GB RAM 服务器上运行 MySql Server 和 dotnet core 服务。我意识到我们的服务抛出了 mysql 连接错误。经过一番调查,我发现 mysql 服务被系统终止了。
我将服务器 RAM 和 CPU 增加到 2 核 4 GB,仍然出现此错误。这种情况并不常见,但我仍然会遇到此错误。
可能存在什么问题?
此致!
journalctl -u mysql
输出:
Aug 17 06:18:59 servername systemd[1]: Starting MySQL Community Server...
Aug 17 06:19:01 servername systemd[1]: Started MySQL Community Server.
Aug 17 11:20:22 servername systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 17 11:20:22 servername systemd[1]: mysql.service: Failed with result 'signal'.
Aug 17 11:20:22 servername systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Aug 17 11:20:22 servername systemd[1]: Stopped MySQL Community Server.
Aug 17 11:20:22 servername systemd[1]: Starting MySQL Community Server...
Aug 17 11:20:24 servername systemd[1]: Started MySQL Community Server.
Aug 17 12:45:04 servername systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 17 12:45:04 servername systemd[1]: mysql.service: Failed with result 'signal'.
Aug 17 12:45:05 servername systemd[1]: mysql.service: Scheduled restart job, restart counter is at 2.
Aug 17 12:45:05 servername systemd[1]: Stopped MySQL Community Server.
Aug 17 12:45:05 servername systemd[1]: Starting MySQL Community Server...
Aug 17 12:45:07 servername systemd[1]: Started MySQL Community Server.
Aug 17 14:27:14 servername systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 17 14:27:14 servername systemd[1]: mysql.service: Failed with result 'signal'.
Aug 17 14:27:14 servername systemd[1]: mysql.service: Scheduled restart job, restart counter is at 3.
Aug 17 14:27:14 servername systemd[1]: Stopped MySQL Community Server.
Aug 17 14:27:14 servername systemd[1]: Starting MySQL Community Server...
Aug 17 14:27:15 servername systemd[1]: Started MySQL Community Server.
Aug 18 06:54:12 servername systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 18 06:54:12 servername systemd[1]: mysql.service: Failed with result 'signal'.
Aug 18 06:54:12 servername systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
Aug 18 06:54:12 servername systemd[1]: Stopped MySQL Community Server.
Aug 18 06:54:12 servername systemd[1]: Starting MySQL Community Server...
Aug 18 06:54:14 servername systemd[1]: Started MySQL Community Server.
Aug 18 11:17:09 servername systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 18 11:17:09 servername systemd[1]: mysql.service: Failed with result 'signal'.
Aug 18 11:17:09 servername systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Aug 18 11:17:09 servername systemd[1]: Stopped MySQL Community Server.
Aug 18 11:17:09 servername systemd[1]: Starting MySQL Community Server...
Aug 18 11:17:11 servername systemd[1]: Started MySQL Community Server.