VPS侦探论坛

 找回密码
 注册
查看: 4063|回复: 5

WordPress建立数据库连接时出错

[复制链接]
发表于 2017-3-12 22:39:49 | 显示全部楼层 |阅读模式

最近出现的频率很高,几乎每天都得手动重启好几次。
下面是重启的时候的日志:一天出现了很多次,每次都是重启之后可以,但是过几个小时就又会出现建立数据库连接时出错。请军哥解答一下,我的是LNMPA1.3版本。
[mpm_prefork:notice] [pid 21648] AH00169: caught SIGTERM, shutting down
[Sun Mar 12 22:20:41.788234 2017] [ssl:warn] [pid 23025] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Mar 12 22:20:41.788374 2017] [lbmethod_heartbeat:notice] [pid 23025] AH02282: No slotmem from mod_heartmonitor
[Sun Mar 12 22:20:41.978186 2017] [mpm_prefork:notice] [pid 23025] AH00163: Apache/2.4.20 (Unix) OpenSSL/1.0.2g PHP/5.6.22 configured -- resuming normal operations
[Sun Mar 12 22:20:41.979244 2017] [core:notice] [pid 23025] AH00094: Command line: '/usr/local/apache/bin/httpd'
[Sun Mar 12 22:22:07.008429 2017] [mpm_prefork:notice] [pid 23025] AH00169: caught SIGTERM, shutting down
[Sun Mar 12 22:22:59.571348 2017] [ssl:warn] [pid 679] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Mar 12 22:22:59.592908 2017] [lbmethod_heartbeat:notice] [pid 679] AH02282: No slotmem from mod_heartmonitor
[Sun Mar 12 22:23:00.070161 2017] [mpm_prefork:notice] [pid 679] AH00163: Apache/2.4.20 (Unix) OpenSSL/1.0.2g PHP/5.6.22 configured -- resuming normal operations
[Sun Mar 12 22:23:00.070232 2017] [core:notice] [pid 679] AH00094: Command line: '/usr/local/apache/bin/httpd'
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-13 11:12:12 | 显示全部楼层


数据库连接错误一般是数据库出现问题,要看数据库的日志,不清楚日志位置可以看置顶帖反馈必读
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-3-13 17:30:58 | 显示全部楼层

回复 2# 的帖子


Killed
170313 00:15:34 mysqld_safe Number of processes running now: 0
170313 00:15:40 mysqld_safe mysqld restarted
170313  0:16:05 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 1936 ...
170313  0:16:42 [Note] Plugin 'FEDERATED' is disabled.
170313  0:16:43 InnoDB: The InnoDB memory heap is disabled
170313  0:16:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170313  0:16:43 InnoDB: Compressed tables use zlib 1.2.8
170313  0:16:43 InnoDB: Initializing buffer pool, size = 16.0M
170313  0:16:43 InnoDB: Completed initialization of buffer pool
170313  0:16:43 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170313  0:16:43  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 15230, file name ./mysql-bin.000062
170313  0:16:44  InnoDB: Waiting for the background threads to start
170313  0:16:45 InnoDB: 5.5.48 started; log sequence number 73326279
170313  0:16:45 [Note] Recovering after a crash using mysql-bin
170313  0:16:45 [Note] Starting crash recovery...
170313  0:16:45 [Note] Crash recovery finished.
170313  0:16:45 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170313  0:16:45 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
170313  0:16:45 [Note] Server socket created on IP: '0.0.0.0'.
170313  0:16:45 [Note] Event Scheduler: Loaded 0 events
170313  0:16:45 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

麻烦军哥帮忙看看,谢谢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-13 17:33:37 | 显示全部楼层

回复 2# 的帖子




上面是凌晨的错误日志,下面是最近一次的错误日志:麻烦军哥指导下,谢谢。
Killed
170313 15:34:27 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZjn05sb311p5fZ.pid ended
170313 16:51:23 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
170313 16:51:23 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 4525 ...
170313 16:51:23 [Note] Plugin 'FEDERATED' is disabled.
170313 16:51:23 InnoDB: The InnoDB memory heap is disabled
170313 16:51:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170313 16:51:23 InnoDB: Compressed tables use zlib 1.2.8
170313 16:51:23 InnoDB: Initializing buffer pool, size = 16.0M
170313 16:51:23 InnoDB: Completed initialization of buffer pool
170313 16:51:23 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170313 16:51:24  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 22388, file name ./mysql-bin.000081
170313 16:51:24  InnoDB: Waiting for the background threads to start
170313 16:51:25 InnoDB: 5.5.48 started; log sequence number 74572467
170313 16:51:25 [Note] Recovering after a crash using mysql-bin
170313 16:51:25 [Note] Starting crash recovery...
170313 16:51:25 [Note] Crash recovery finished.
170313 16:51:26 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170313 16:51:26 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
170313 16:51:26 [Note] Server socket created on IP: '0.0.0.0'.
170313 16:51:26 [Note] Event Scheduler: Loaded 0 events
170313 16:51:26 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-13 19:33:19 | 显示全部楼层

回复 4# 的帖子


Killed就是被kill了,就是内存不足导致的

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-3-13 22:42:15 | 显示全部楼层

回复 5# 的帖子


好的,谢谢军哥,感觉没用多少内存,阿里云服务器。请求也不是太多,老是突然连接错误。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 08:23 , Processed in 0.026884 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表