大网数据广告活动
服务器运维问答

Server shutdown in progress for hours

· 52CE 我爱测

I have a relatively large database (> 500 GB), and have run a yum update last night, that upgraded mysql-community-server . Since then, the MySQL server has been in "Server shutdown in progress" status for 16 hours now: # service…

问题原文

原帖链接 · BenMorel · CC BY-SA 4.0

I have a relatively large database (> 500 GB), and have run a yum update last night, that upgraded mysql-community-server.

Since then, the MySQL server has been in "Server shutdown in progress" status for 16 hours now:

# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mysqld.service.d
           └─override.conf
   Active: deactivating (stop-sigterm) since Mon 2020-07-20 01:18:28 CEST; 14h ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
 Main PID: 8318 (mysqld)
   Status: "Server shutdown in progress"
   CGroup: /system.slice/mysqld.service
           └─8318 /usr/sbin/mysqld

Plus, mysqld is now constantly using 300% CPU.

Is there a problem, or is this just a consequence of the database being large? Is there any way I can get some idea of the time left, or see what the server is actually doing?

And is there anything I can do to speed up the process?

For information, the server is a 6-core Xeon with 128GB RAM and NVMe drives, so rather fast.

There is plenty of available disk space and free RAM.

# free -m
              total        used        free      shared  buff/cache   available
Mem:         128889       88292       11189        2225       29407       37145
Swap:         16381        5168       11213

Update: it's now been 72 hours. Nothing has changed.

已采纳解答

原帖链接 · Geeky Masters · CC BY-SA 4.0

Seems it's known bug and the reason why it happened because you haven't stopped database before the upgrade and some query was running.

You can find more details on Percona article

Try to use command line utility mytop to see what's going on. But you've mentioned you can't reach the database, try under root user. If it's possible make a backup of the database, if you can't in worse case you try to repair the DB using commands in MySQL documentation

In this answer is suggestion it's may related to the time settings on your server.

To obtain information about the stuck process you may use lsof -c mysqld should give you hint.

Instead of killing the mysqld process rather try to restart the server from command systemctl reboot or shutdown -r now, don't pull it out of the plug.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。