长风1959

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

 

 

连接超时

Aborted connection 2519172 to db: 'zabbix' user: 'zabbix' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication packets)

解决办法: 修改配置文件 /etc/my.cnf

interactive_timeout = 120

wait_timeout = 120

在命令行中可以这样修改:

mysql>set global interactive_timeout = 120;

mysql>set global wait_timeout = 120;

 

 

日志文件太小

[ERROR] InnoDB: The age of the last checkpoint is 9924543, which excees the log group capacity 9433498.

在命令行查看log块内容

mysql>show engine innodb status \G

如果经常出现这类告警,可以将innodb_log_file_size参数调大

1.停止mysql;
2.增大my.cnf中的innodb_log_file_size参数的大小;
3.将ib_logfile* 的文件移至其他目录;
4.启动mysql,检查启动是否正常。
innodb_log_file_size默认是5M,那么要调整到多大合适呢?可以估算innodb_log_file_size

mysql> show engine innodb status\G select sleep(60); show engine innodb status\G
Log sequence number 1489416797668
...
Log sequence number 1489429728711

mysql> select (1489429728711-1489416797668)60/1024/1024;

 
posted on 2022-11-01 13:59  长风1959  阅读(228)  评论(0编辑  收藏  举报