我有一台安装了 Nginx 的 DigitalOcean Ubuntu 16.4 机器。这可能与 Wordpress 安装有关,也可能无关。MySQL 会随机关闭。
它创建了一个 1GB 交换文件。1GB RAM。可能与内存问题无关。
apt-get upgrade
当我执行一个操作并且在 MySQL 升级时升级停止时开始发生。
根本没有错误日志。
但是这是来自 Ubuntu 的日志-
(Reading database ... ^M(Reading database ... 5%^M(Reading database ...
10%^M(Reading database ...
15%^M(Reading database ... 20%^M(R$
Removing linux-headers-4.4.0-168 (4.4.0-168.197) ...
Setting up mysql-server-5.7 (5.7.28-0ubuntu0.16.04.2) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-
common/configure-symlinks:
No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup
error from a previous
failure.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
我之前找到了一个解决方法,即注释掉 MySQL 配置文件中的一行,但忘记是哪一行了。当遇到同样的问题时,这种方法就解决了。就我而言,内存分配看起来不错,但话又说回来,当进程关闭时,我从未登录或监控过该进程。