a172606220 发表于 2017-3-12 22:39:49

WordPress建立数据库连接时出错

最近出现的频率很高,几乎每天都得手动重启好几次。
下面是重启的时候的日志:一天出现了很多次,每次都是重启之后可以,但是过几个小时就又会出现建立数据库连接时出错。请军哥解答一下,我的是LNMPA1.3版本。
AH00169: caught SIGTERM, shutting down
AH01873: Init: Session Cache is not configured
AH02282: No slotmem from mod_heartmonitor
AH00163: Apache/2.4.20 (Unix) OpenSSL/1.0.2g PHP/5.6.22 configured -- resuming normal operations
AH00094: Command line: '/usr/local/apache/bin/httpd'
AH00169: caught SIGTERM, shutting down
AH01873: Init: Session Cache is not configured
AH02282: No slotmem from mod_heartmonitor
AH00163: Apache/2.4.20 (Unix) OpenSSL/1.0.2g PHP/5.6.22 configured -- resuming normal operations
AH00094: Command line: '/usr/local/apache/bin/httpd'

licess 发表于 2017-3-13 11:12:12

数据库连接错误一般是数据库出现问题,要看数据库的日志,不清楚日志位置可以看置顶帖反馈必读

a172606220 发表于 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
1703130:16:05 /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 1936 ...
1703130:16:42 Plugin 'FEDERATED' is disabled.
1703130:16:43 InnoDB: The InnoDB memory heap is disabled
1703130:16:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
1703130:16:43 InnoDB: Compressed tables use zlib 1.2.8
1703130:16:43 InnoDB: Initializing buffer pool, size = 16.0M
1703130:16:43 InnoDB: Completed initialization of buffer pool
1703130: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!
1703130:16:43InnoDB: 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
1703130:16:44InnoDB: Waiting for the background threads to start
1703130:16:45 InnoDB: 5.5.48 started; log sequence number 73326279
1703130:16:45 Recovering after a crash using mysql-bin
1703130:16:45 Starting crash recovery...
1703130:16:45 Crash recovery finished.
1703130:16:45 Server hostname (bind-address): '0.0.0.0'; port: 3306
1703130:16:45    - '0.0.0.0' resolves to '0.0.0.0';
1703130:16:45 Server socket created on IP: '0.0.0.0'.
1703130:16:45 Event Scheduler: Loaded 0 events
1703130:16:45 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log'socket: '/tmp/mysql.sock'port: 3306Source distribution

麻烦军哥帮忙看看,谢谢。

a172606220 发表于 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 /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 4525 ...
170313 16:51:23 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:24InnoDB: 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:24InnoDB: Waiting for the background threads to start
170313 16:51:25 InnoDB: 5.5.48 started; log sequence number 74572467
170313 16:51:25 Recovering after a crash using mysql-bin
170313 16:51:25 Starting crash recovery...
170313 16:51:25 Crash recovery finished.
170313 16:51:26 Server hostname (bind-address): '0.0.0.0'; port: 3306
170313 16:51:26    - '0.0.0.0' resolves to '0.0.0.0';
170313 16:51:26 Server socket created on IP: '0.0.0.0'.
170313 16:51:26 Event Scheduler: Loaded 0 events
170313 16:51:26 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.48-log'socket: '/tmp/mysql.sock'port: 3306Source distribution

licess 发表于 2017-3-13 19:33:19

回复 4# 的帖子

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

a172606220 发表于 2017-3-13 22:42:15

回复 5# 的帖子

好的,谢谢军哥,感觉没用多少内存,阿里云服务器。请求也不是太多,老是突然连接错误。。
页: [1]
查看完整版本: WordPress建立数据库连接时出错