最新消息:20210917 已从crifan.com换到crifan.org

【已解决】尝试解决crifan.org的WordPress网站经常出错:建立数据库连接时出错

数据库 crifan 818浏览 0评论
折腾:
【已解决】crifan.org打开报错:建立数据库连接时出错
期间,访问
crifan.org
又报错了:
之前多次时不时遇到此问题,已手动重启服务器而规避,但是没彻底解决。
现在又出现了。去尝试解决问题:
[root@crifan ~]# service mysqld status
MySQL running (21519)                                      [  OK  ]
mysql是没问题的啊 
去登录phpmyadmin,看看能否修复mysql
phpMyAdmin Control Panel URL
phpMyAdmin - Error

Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.


session_write_close(): write failed: No space left on device (28)


session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct ()
去试试别的路径
http://xxx/default/tools/phpMyAdmin/
404 Not Found
Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!
URL: 
http://xxx/default/tools/phpMyAdmin/ 
Server: 
crifan.org 
Date: 
2020/06/09 09:17:48 


Powered by Tengine

tengine
算了,去复制工具到别处
才注意到:
之前tool启动失败的log是
session_write_close(): write failed: No space left on device (28)
很明显是空间不够
所以去看看
[root@crifan default]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G   75G     0 100% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  193M  1.7G  11% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           379M     0  379M   0% /run/user/0
很明显,此处空间满了
估计是log日志占用的?
去看看:
【已解决】CentOS中mysql的bin的log日志文件占用太多空间
再去重启服务器
看看是否解决问题
问题依旧。
去看看:
【已解决】mysql启动报错:MySQL is not running but lock file /var/lock/subsys/mysql FAILED
但是问题依旧:
不过换了地址:
https://www.crifan.org/wp-admin/
问题变成:
一些数据表不可用。也许需要修复数据库。
所以去修复
有些数据表无效。若您希望让WordPress尝试修复它们,请点击“修复数据库”按钮。修复过程需要一点时间,请耐心等待。
修复数据库
WordPress还可以尝试优化数据库,这在某些情况下能提高数据库性能。修复和优化数据库的过程需要一段时间,请耐心等待——在此期间我们会锁定(lock)数据表。
修复并优化数据库
修复并优化数据库
wp_users数据表正常。
    wp_users数据表已优化过了。


wp_usermeta数据表正常。
    wp_usermeta数据表已优化过了。


wp_posts数据表正常。
    wp_posts数据表已优化过了。


“wp_comments”数据表有问题。报告的问题是:8 clients are using or haven't closed the table properly。WordPress正在尝试进行修复…
    无法修复wp_comments表。错误消息:8 clients are using or haven't closed the table properly

wp_links数据表正常。

“wp_options”数据表有问题。报告的问题是:Table is marked as crashed。WordPress正在尝试进行修复…
    无法修复wp_options表。错误消息:Table is marked as crashed


“wp_postmeta”数据表有问题。报告的问题是:12 clients are using or haven't closed the table properly。WordPress正在尝试进行修复…
    无法修复wp_postmeta表。错误消息:12 clients are using or haven't closed the table properly

wp_terms数据表正常。
wp_term_taxonomy数据表正常。
wp_term_relationships数据表正常。
wp_termmeta数据表正常。

“wp_commentmeta”数据表有问题。报告的问题是:8 clients are using or haven't closed the table properly。WordPress正在尝试进行修复…
    无法修复wp_commentmeta表。错误消息:8 clients are using or haven't closed the table properly

部分数据库问题无法修复。请复制下列错误信息,前往WordPress支持论坛寻求帮助。

wp_comments: 8 clients are using or haven't closed the table properly
wp_options: Table is marked as crashed
wp_postmeta: 12 clients are using or haven't closed the table properly
wp_commentmeta: 8 clients are using or haven't closed the table properly
https://www.crifan.org
即可正常了:
【总结】
此处,是磁盘空间满了,导致后续msyql和WordPress都无法正常启动
磁盘慢是由于mysql的bin的log文件太多导致的,通过:
【已解决】CentOS中mysql的bin的log日志文件占用太多空间
解决了。
然后再去进入
https://www.crifan.org/wp-admin/
去修复一下数据库,即可。
至此,估计问题算是彻底解决了。
以后如何还遇到,再去解决。

转载请注明:在路上 » 【已解决】尝试解决crifan.org的WordPress网站经常出错:建立数据库连接时出错

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.209 seconds, using 23.20MB memory