云樾
云樾

记录1次离奇“502 error”

记录1次离奇“502 error”

今天中午打开博客,发现无法加载?! :-o 顺势打开AMH后台,发现也无法加载…

在一脸懵逼后,率先想到的是不是被人攻击了,所以立即排查了vps的登陆/操作记录,发现没什么异常。

接着联想到“502 bad gateway”错误一般是由PHP引发的,故使用amh的命令重载/重启了PHP服务:

amh php restart

试了几次后… 好吧,看起来也很正常,也没提示什么错误。行,那就顺势把NGINX和MySQL等都重启一下吧。 :( 

NGINX很正常,但到了MySQL,奇怪的事情发生了。restart operation一直卡着,无法成功,行,我重启vps试试。 :-x 

重启vps后的MySQL再也无法打开了,提示:

ubuntu@10-7-24-3:~$ amh mysql start
ubuntu@10-7-24-3:~$ sudo amh mysql start
=============================================================
 [Linux] AMH 5.8
 http://amh.sh

[mysql start]
=============================================================
=============================================================
 [Linux] AMH 5.8
 http://amh.sh

[mysql-generic-5.5 start]
=============================================================
mysql-generic-5.5
[OK] mysql-generic-5.5 is already installed.
Starting MySQL
. * The server quit without updating PID file (/home/usrdata/mysql-generic-5.5/mysql.pid).
200820 12:52:04 [Note] Plugin 'InnoDB' is disabled.
200820 12:52:04 [Note] Plugin 'FEDERATED' is disabled.
200820 12:52:04 [Note] Event Scheduler: Loaded 0 events
200820 12:52:04 [Note] /usr/local/mysql-generic-5.5/bin/mysqld: ready for connections.
Version: '5.5.62-log'  socket: '/tmp/mysql-generic-5.5.sock'  port: 0  MySQL Community Server (GPL)
201215  2:28:02 [Warning] Disk is full writing './amh/amh_process.TMD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
201215  2:28:02 [Warning] Retry in 60 secs. Message reprinted in 600 secs
201215  2:30:02 [Warning] Disk is full writing './mysql-bin.000003' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
201215  2:30:02 [Warning] Retry in 60 secs. Message reprinted in 600 secs
201215  2:38:02 [Warning] Disk is full writing './amh/amh_process.TMD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)

好家伙,disk还真满了? :roll: 

吓得我赶紧用df -lh看了一波:

disk直接给老子撑炸了

怪不得mysql的bin-log都无法创建了,原来disk早就爆了,这还能忍?赶紧用du -sh *看一波到底是什么文件在作妖:

每小时产生了60个备份文件

一天之内居然产生了这么多备份文件 :-o ,难道是在amh设置的备份定时任务有问题?

一检查,果然,cron表达式写错了,15号当天每小时会执行60次全站备份,直接撑爆了硬盘。删掉原备份,重新改写cron,问题解决。 :twisted:

声明:转载文章《记录1次离奇“502 error”》请务必注明出处

发表评论

textsms
account_circle
email

云樾

记录1次离奇“502 error”
今天中午打开博客,发现无法加载?! :-o 顺势打开AMH后台,发现也无法加载... 在一脸懵逼后,率先想到的是不是被人攻击了,所以立即排查了vps的登陆/操作记录,发现没什么异常。 接着联…
扫描二维码继续阅读
2020-12-15