文档章节

host blocked because of many connection errors

威哥
 威哥
发布于 2015/11/20 14:07
字数 525
阅读 117
收藏 0

unblock with 'mysqladmin flush-hosts'
思路 

  1. 查看连接数

    Max_used_connections / max_connections * 100% ≈ 85%

    一般的服务 最大设置1000 以下就差不多了

  2. 查看最大错误连接设置

  3. 是否是锁表

  • 是否并发访问

    最后 去查看相关资料 也是这样操作的,详细请查看



  • If you get a MySQL error like:

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • This most likely means your PHP / Java whatever programming language application connecting to MySQL is failing to authenticate with the application created (existing) or that the application is trying too many connections to MySQL in a rate where MySQL server can't serve all the requests.

  • Some common errors for Too many Connection errors are:
     

  • Networking Problem

  • Server itself could be down

  • Authentication Problems

  • Maximum Connection Errors allowed.

  • The value of the max_connection_errors system variable determines how many successive interrupted connection requests are permitted to myqsl server.
     

  • Well anyways if you get the:

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • You can consider this a sure sign application connections to MySQLis logging a lot of error connections, for some reason.
    This error could also appear on very busy websites where high amount of separete connections are used – I've seen the error occur on PHP websites whether mysql_pconnect(); is selected in favour of the prooved working mysql_connect();

  • The first thing to do before changing / increasing default set of max connection errors is to check how many max connection errors are set within MySQL?

  • For that connect with MySQL CLI and issue:
     

  • mysql> SHOW VARIABLES LIKE '%error%';


  • +——————–+————————————————————-+
    | Variable_name      | Value                                                           |
    +——————–+————————————————————-+
    | error_count        | 0                                                                     |
    | log_error          | /var/log/mysql//mysqld.log                                |
    | max_connect_errors | 10000                                                      |
    | max_error_count    | 64                                                               |
    | slave_skip_errors  | OFF                                                             |
    +——————–+————————————————————-+


  • A very useful mysql cli command in debugging max connection errors reached problem is

  • mysql> SHOW PROCESSLIST;

  •  

  • To solve the error, try to tune in /etc/my.cnf, /etc/mysql/my.cnf or wherever my.cnf is located:

  • [mysqld]
    max_connect_errors
    variable

  • and

  • wait_timeout var. Some reasonable variable size would be:

  • max_connect_errors = 100000
    wait_timeout = 60

  • If such (anyways) high values is still not high enough you can raise mysql config connection timeout

  •  

  • to

  • max_connect_errors = 100000000

  • Also if you want to try raise max_connect_errors var without making it permanenty (i.e. remember var setting after MySQL service restart), set it from MySQL cli with:

  • SET GLOBAL max_connect_errors


  • If you want to keep the set default max_connection_errors and fix it temporary, you can try to follow the error

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • suggestion and issue in root console:

  • mysqladmin flush-hosts

  • Same could also be done from MySQL Cli with cmd:
     

  • FLUSH HOSTS;

  • - See more at: http://pc-freak.net/blog/host-blocked-connection-errors-unblock-mysqladmin-flushhosts/#sthash.5Gx5ukgE.dpuf


原文地址 http://pc-freak.net/blog/host-blocked-connection-errors-unblock-mysqladmin-flushhosts/

© 著作权归作者所有

共有 人打赏支持
威哥
粉丝 18
博文 21
码字总数 14506
作品 0
大兴
程序员
私信 提问
mysql 无法连接问题many connection

MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法 环境:linux,mysql5.5.21 错误:Host is blocked because of many connectio......

younchen
2014/01/14
0
1
Mysql-connecion failed blocked because of many connection errors

今天调用api接口时出现错误ERHOSTIS_BLOCKED: Host '192.168.1.223' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'查询错误发现是由于 同一个ip在短......

johnL
2016/12/17
11
0
mycat连接不上mysql数据库

1:首先查看schema.xml中数据库地址和数量是否配置正确 2:查看mycat.log日志看具体什么错误。个人报错: can't connect to mysql server ,errmsg:Host '192.168.100.196' is blocked becaus...

芬野de博客
11/06
0
0
MySql Host is blocked because of many connection e

环境:linux,mysql5.5.21 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因:   同一个ip在短时间内产生太多(超过mysql数据库max...

庸夫俗子
2014/12/31
0
0
MySQL客户端连接时 MySql Host is blocked because of many.

错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因:   同一个ip在短时间内产生太多(超过mysql数据库maxconnectionerrors的最大值)...

岸芷汀兰
2016/03/03
35
0

没有更多内容

加载失败,请刷新页面

加载更多

Windows 10 设置 Java 环境变量

首先你需要在我的电脑中打开,找到环境变量属性。 找到环境变量属性 找到环境变量属性后单击将会看到下面的设置界面。 在这个界面中设置高级系统设置。 环境变量 在弹出的界面中选择设置环境...

honeymose
今天
1
0
用any-loader封装jQuery的XHR —— 随便写着玩系列

哎,都说没人用JQuery啦,叫你别写这个。 其实我也是好高骛远使用过npm上某个和某个很出名的XHR库,嗯,认识我的人都知道我喜欢喷JQ,以前天天喷,见面第一句,你还用JQ,赶紧丢了吧。但我也...

曾建凯
今天
7
0
聊聊storm的AggregateProcessor的execute及finishBatch方法

序 本文主要研究一下storm的AggregateProcessor的execute及finishBatch方法 实例 TridentTopology topology = new TridentTopology(); topology.newStream("spout1", spout......

go4it
今天
4
0
大数据教程(7.5)hadoop中内置rpc框架的使用教程

博主上一篇博客分享了hadoop客户端java API的使用,本章节带领小伙伴们一起来体验下hadoop的内置rpc框架。首先,由于hadoop的内置rpc框架的设计目的是为了内部的组件提供rpc访问的功能,并不...

em_aaron
今天
5
0
CentOS7+git+github创建Python开发环境

1.准备CentOS7 (1)下载VMware Workstation https://pan.baidu.com/s/1miFU8mk (2)下载CentOS7镜像 https://mirrors.aliyun.com/centos/ (3)安装CentOS7系统 http://blog.51cto.com/fengyuns......

枫叶云
昨天
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部