阿里云服务器关闭mysql数据库_mysql - 阿里云服务器数据库自动关闭,怎么解决...

mysql - 阿里云服务器数据库自动关闭,怎么解决

1404ff433e84f710e3b5fa747f6f5da4.png

怪我咯2017-04-17 14:26:19 0 2 108

网站运行一段时间,突然连不上数据库了,重启数据库,网站又正常了!请问是什么原因呢?

以下是错误日子内容:

160423 00:45:59 mysqld_safe Number of processes running now: 0

160423 00:45:59 mysqld_safe mysqld restarted

160423 0:46:10 InnoDB: Initializing buffer pool, size = 8.0M

160423 0:46:10 InnoDB: Completed initialization of buffer pool

InnoDB: Error: pthread_create returned 11

160423 00:46:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

160423 02:19:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

160423 2:19:52 InnoDB: Initializing buffer pool, size = 8.0M

160423 2:19:52 InnoDB: Completed initialization of buffer pool

InnoDB: Log scan progressed past the checkpoint lsn 0 4483638

160423 2:19:52 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: Doing recovery: scanned up to log sequence number 0 4483853

160423 2:19:52 InnoDB: Starting an apply batch of log records to the database...

InnoDB: Progress in percents: 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

InnoDB: Apply batch completed

160423 2:19:53 InnoDB: Started; log sequence number 0 4483853

160423 2:19:53 [Note] Event Scheduler: Loaded 0 events

160423 2:19:53 [Note] /usr/libexec/mysqld: ready for connections.

Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

160423 22:23:09 mysqld_safe Number of processes running now: 0

160423 22:23:09 mysqld_safe mysqld restarted

160423 22:23:09 InnoDB: Initializing buffer pool, size = 8.0M

160423 22:23:09 InnoDB: Completed initialization of buffer pool

InnoDB: The log sequence number in ibdata files does not match

InnoDB: the log sequence number in the ib_logfiles!

160423 22:23:09 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...

160423 22:23:10 InnoDB: Started; log sequence number 0 4484975

160423 22:23:10 [Note] Event Scheduler: Loaded 0 events

160423 22:23:10 [Note] /usr/libexec/mysqld: ready for connections.

Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

160423 22:23:20 mysqld_safe Number of processes running now: 0

160423 22:23:20 mysqld_safe mysqld restarted

160423 22:24:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

160423 23:39:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

160423 23:39:13 InnoDB: Initializing buffer pool, size = 8.0M

160423 23:39:13 InnoDB: Completed initialization of buffer pool

InnoDB: The log sequence number in ibdata files does not match

InnoDB: the log sequence number in the ib_logfiles!

160423 23:39:13 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...

160423 23:39:14 InnoDB: Started; log sequence number 0 4484975

160423 23:39:14 [Note] Event Scheduler: Loaded 0 events

160423 23:39:14 [Note] /usr/libexec/mysqld: ready for connections.

Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

72167.html

回答

2

0

分享

全部回复 (2)

a5e3a49d70bbd765af8fcca8c8a28eff.png

PHP中文网2017-04-17 14:28:192楼

从日志看报错的是这条InnoDB: Error: pthread_create returned 11 ,也就是stackoverflow,需要增大栈的大小限制。

ulimit -s 查看栈大小的限制。 我个人的pc上是8192 (KB), ulimit -s n 设置栈大小限制,ulimit -s unlimited 设置无上限(不推荐,但可以用来验证是否是这个原因)。

设置仅对当前会话生效,持久化可以将设置加入到/etc/profile 中。

72167.html

回复cb016ba96c64dd5ff7d382c7604bef3b.png

迷茫2017-04-17 14:28:191楼

长时间没有跟数据库交流会自动断开吧,,把数据库连接调成 保持连接试试

72167.html

回复

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值