1. 相关查询连接数的命令

mysql>show variables like '%max_connections%';
+-------------------------+-----------------+
| Variable_name           | Value           |
+-------------------------+-----------------+
| extra_max_connections   |                 |
| max_connections         | 572             |
+-------------------------+-----------------+
返回行数:[2],耗时:3 ms.
mysql>select SUBSTRING_INDEX(host,':',1) as ip , count(*) from information_schema.processlist group by ip;
+----------------+--------------------+
| ip             | count(*)           |
+----------------+--------------------+
| 10.172.172.252 | 3                  |
| 10.24.190.26   | 2                  |
| 10.252.40.152  | 1                  |
| 10.44.33.0     | 2                  |
| 11.192.101.60  | 4                  |
| 113.47.233.165 | 4                  |
+----------------+--------------------+
返回行数:[6],耗时:2 ms.
mysql>show full processlist;
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+-----------------------+-----------------------+--------------------------------+------------------------+------------------------------+-------------------------------+--------------------------------+--------------------------------+-------------------------------+
| Id           | User            | Host                 | db              | Command           | Time           | State           | Info                  | Memory_used           | Memory_used_by_query           | Logical_read           | Physical_sync_read           | Physical_async_read           | Temp_user_table_size           | Temp_sort_table_size           | Temp_sort_file_size           |
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+-----------------------+-----------------------+--------------------------------+------------------------+------------------------------+-------------------------------+--------------------------------+--------------------------------+-------------------------------+
| 151531737    | chgg_dev        | 10.252.40.152:34428  | chgg_erp_dev    | Sleep             |              3 |                 |                       | 0                     | 8208                           | 57                     | 2                            | 0                             | 0                              | 0                              | 0                             |
| 151620590    | chgg_erp_prod   | 11.192.101.60:39350  | chgg_erp_prod   | Sleep             |             41 |                 |                       | 0                     | 8208                           | 0                      | 0                            | 0                             | 0                              | 0                              | 0                             |
| 168356902    | chgg_plant_prod | 10.24.190.26:33829   | chgg_plant_prod | Sleep             |              4 |                 |                       | 0                     | 8208                           | 422                    | 20                           | 0                             | 0                              | 0                              | 0                             |
| 168474692    | chgg_plant_prod | 113.47.233.165:39228 | chgg_plant_prod | Sleep             |            301 |                 |                       | 0                     | 8208                           | 145692                 | 3566                         | 580                           | 0                              | 0                              | 0                             |
| 168755874    | chgg_pmonitor   | 10.172.172.252:49211 | chgg-pmonitor   | Sleep             |              1 |                 |                       | 2204008               | 8208                           | 48178                  | 287                          | 0                             | 0                              | 0                              | 0                             |
| 202170433    | chgg_plant_prod | 113.47.233.165:39235 | chgg_plant_prod | Sleep             |            336 |                 |                       | 7512                  | 8208                           | 0                      | 0                            | 0                             | 0                              | 0                              | 0                             |
| 218187874    | chgg_plant_prod | 113.47.233.165:39240 | chgg_plant_prod | Sleep             |            338 |                 |                       | 0                     | 8208                           | 11                     | 5                            | 0                             | 0                              | 0                              | 0                             |
| 218973130    | chgg_erp_prod   | 11.192.101.60:39372  | chgg_erp_prod   | Query             |              0 | init            | show full processlist | 0                     | 8208                           | 0                      | 0                            | 0                             | 0                              | 0                              | 0                             |
| 537180277    | chgg_plant_prod | 113.47.233.165:39244 | chgg_plant_prod | Sleep             |            338 |                 |                       | 0                     | 8208                           | 0                      | 0                            | 0                             | 0                              | 0                              | 0                             |
| 537315291    | chgg_pmonitor   | 10.172.172.252:49210 | chgg-pmonitor   | Sleep             |              1 |                 |                       | 2201064               | 8208                           | 47574                  | 244                          | 0                             | 0                              | 0                              | 0                             |
| 537591682    | chgg_erp_prod   | 11.192.101.60:39234  | chgg_erp_prod   | Sleep             |              6 |                 |                       | 2240                  | 8208                           | 0                      | 0                            | 0                             | 0                              | 0                              | 0                             |
| 570439957    | chgg_dev        | 10.44.33.0:51664     | zentaopms       | Sleep             |              3 |                 |                       | 0                     | 8208                           | 45                     | 0                            | 0                             | 0                              | 0                              | 0                             |
| 571064761    | chgg_dev        | 10.44.33.0:50805     | zentaopms       | Sleep             |              7 |                 |                       | 2141656               | 8208                           | 2526                   | 9                            | 0                             | 0                              | 0                              | 0                             |
| 571127916    | chgg_pmonitor   | 10.172.172.252:49213 | chgg-pmonitor   | Sleep             |              1 |                 |                       | 2074416               | 8208                           | 48131                  | 295                          | 0                             | 0                              | 0                              | 0                             |
| 604379796    | chgg_plant_prod | 10.24.190.26:33830   | chgg_plant_prod | Sleep             |              4 |                 |                       | 0                     | 8208                           | 35                     | 0                            | 0                             | 0                              | 0                              | 0                             |
| 604656879    | chgg_erp_prod   | 11.192.101.60:39265  | chgg_erp_prod   | Sleep             |             49 |                 |                       | 208                   | 8208                           | 1189                   | 70                           | 0                             | 0                              | 0                              | 0                             |
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+-----------------------+-----------------------+--------------------------------+------------------------+------------------------------+-------------------------------+--------------------------------+--------------------------------+-------------------------------+
返回行数:[16],耗时:2 ms.
mysql>show processlist;
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+------------------+
| Id           | User            | Host                 | db              | Command           | Time           | State           | Info             |
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+------------------+
| 151531737    | chgg_dev        | 10.252.40.152:34428  | chgg_erp_dev    | Sleep             |              3 |                 |                  |
| 151620590    | chgg_erp_prod   | 11.192.101.60:39350  | chgg_erp_prod   | Sleep             |             41 |                 |                  |
| 168356902    | chgg_plant_prod | 10.24.190.26:33829   | chgg_plant_prod | Sleep             |              4 |                 |                  |
| 168474692    | chgg_plant_prod | 113.47.233.165:39228 | chgg_plant_prod | Sleep             |            301 |                 |                  |
| 168755874    | chgg_pmonitor   | 10.172.172.252:49211 | chgg-pmonitor   | Sleep             |              1 |                 |                  |
| 202170433    | chgg_plant_prod | 113.47.233.165:39235 | chgg_plant_prod | Sleep             |            336 |                 |                  |
| 218187874    | chgg_plant_prod | 113.47.233.165:39240 | chgg_plant_prod | Sleep             |            338 |                 |                  |
| 218973130    | chgg_erp_prod   | 11.192.101.60:39372  | chgg_erp_prod   | Query             |              0 | init            | show processlist |
| 537180277    | chgg_plant_prod | 113.47.233.165:39244 | chgg_plant_prod | Sleep             |            338 |                 |                  |
| 537315291    | chgg_pmonitor   | 10.172.172.252:49210 | chgg-pmonitor   | Sleep             |              1 |                 |                  |
| 537591682    | chgg_erp_prod   | 11.192.101.60:39234  | chgg_erp_prod   | Sleep             |              6 |                 |                  |
| 570439957    | chgg_dev        | 10.44.33.0:51664     | zentaopms       | Sleep             |              3 |                 |                  |
| 571064761    | chgg_dev        | 10.44.33.0:50805     | zentaopms       | Sleep             |              7 |                 |                  |
| 571127916    | chgg_pmonitor   | 10.172.172.252:49213 | chgg-pmonitor   | Sleep             |              1 |                 |                  |
| 604379796    | chgg_plant_prod | 10.24.190.26:33830   | chgg_plant_prod | Sleep             |              4 |                 |                  |
| 604656879    | chgg_erp_prod   | 11.192.101.60:39265  | chgg_erp_prod   | Sleep             |             49 |                 |                  |
+--------------+-----------------+----------------------+-----------------+-------------------+----------------+-----------------+------------------+
返回行数:[16],耗时:2 ms.

2. 修改my.ini/my.cnf配置文件的最大连接数相关配置(阿里云服务器无效,增加连接数需要花钱买)[mysqld]max_connections = 1000wait_timeout = 5

3.如何重启mysql(阿里云服务器无效,无法重启mysql)service mysqld restart/etc/inint.d/mysqld restart

阿里云服务器晚上运行定时任务报Too many connections的更多相关文章

  1. 阿里云服务器怎么运行多个项目(Nginx)

    server { listen 80; server_name yy.test.cn; access_log /data/wwwlogs/access_nginx.log combined; root ...

  2. blesta运行造成阿里云服务器CPU频繁超载的原因分析

    博主在阿里云服务器上安装了主机软件Blesta后,阿里云后台频繁提示CPU超载,打开突发性能模式后,发现CPU负载到了100%.如下图所示: 直接在putty里面reboot整个系统后,负载瞬间降为2 ...

  3. 在阿里云服务器ubuntu14.04运行netcore

    从netcore1.0正式发布就很激动,想要赶紧学习. 最近博客园的一篇文章给了完整的指导非常感谢,但是在实际实现到发布到阿里云服务器遇到一些问题,记录下来. 首先上基础文章http://www.cn ...

  4. 阿里云服务器tomcat ./shutdown.sh关闭命令报错Could not contact localhost:8005. Tomcat may not be running.

    JDK1.8运行./shutdown 停止tomcat报错: 昨天购买了一个阿里云服务器,由于时间问题今天才来启动tomcat,启动的时候才发现跟我以前使用的服务器不太一样,去网上搜索了半天以为是to ...

  5. 阿里云服务器报 Liunx异常文件下载处理办法

    阿里云服务器报 Liunx异常文件下载.挖矿进程.SSH远程非交互式一句话异常指令执行 清除办法 1.删除crontab里面的自启动脚本 2.删除authorized_keys 里面密匙 3.删除#/ ...

  6. 阿里云服务器ubuntu安装java运行环境

    服务器 阿里云服务器ubuntu安装java运行环境 转:http://www.codingyun.com/article/45.html 今天来给大家介绍一下在阿里云ubuntu服务器下安装java ...

  7. 阿里云服务器用Docker配置运行nginx并访问

    一.Docker拉取nginx镜像 docker pull nginx:1.12.2 这里是下载的是nginx的1.12.2版本,其他版本的镜像请访问https://hub.docker.com/r/ ...

  8. 阿里云服务器win2003下iis整合tomcat共享80端口

    阿里云服务器win2003下iis整合tomcat共享80端口 很多机器都用tomcat跟IIS部署不同网站.最近买了阿里云的服务器.于是也想玩一下.网上百度了很多方法.但是都有缺陷说的不是很清楚.通 ...

  9. 阿里云服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL)

    一.快速安装Apache+PHP5+MySql ----------------------------------------------------- 补充:由于163的yum源上只有php5.1 ...

随机推荐

  1. Python:Day41 http、css

    HTTP(hypertext transport protocol),即超文本传输协议.这个协议详细规定了浏览器和万维网服务器之间互相通信的规则. 2.请求协议 请求协议的格式如下: 请求首行: // ...

  2. 【vue】钩子函数生命周期

    图1 图2: 图3 相关资料:http://www.zhimengzhe.com/Javascriptjiaocheng/236707.html    https://segmentfault.com ...

  3. 网站建设部署与发布--笔记2-部署Apache

    网站部署(Linux) 部署Apache 操作系统:CentOS 7.2 1.首先连接云服务器,清楚系统垃圾. $ yum clean all Loaded plugins: fastestmirro ...

  4. (4)HomeAssistant 自动化

    https://www.home-assistant.io/docs/automation/ 触发器,条件和动作. (trigger) When Paulus arrives home (condit ...

  5. Python IDLE 增加清屏功能

    (Python2,Python3 通用) 保存如下代码到 ClearWindow.py """ Clear Window Extension Version: 0.2 A ...

  6. P2251 质量检测--洛谷luogu

    传送门 题目描述 为了检测生产流水线上总共N件产品的质量,我们首先给每一件产品打一个分数A表示其品质,然后统计前M件产品中质量最差的产品的分值Q[m] = min{A1, A2, ... Am},以及 ...

  7. 本地搭了http服务(localhost),怎么在vue环境下,通过axios获取到接口数据

    1. 找到 vue项目\config\index.js 文件 2. proxyTable: { '/api': { target: 'http://127.0.0.1:9420', changeOri ...

  8. Generative Adversarial Nets[LSGAN]

    0 背景 在这之前大家在训练GAN的时候,使用的loss函数都是sigmoid_cross_entropy_loss函数,然而xudon mao等人发现当使用伪造样本去更新生成器(且此时伪造样本也被判 ...

  9. odoo常用widget

      widget=”statusbar” 头部状态条标签widget=”email” 电子邮件地址标签widget=”selection” 下拉选择标签widget=”mail_followers” ...

  10. Gym101194J Mr.Panda and TubeMaster 二分图、费用流

    传送门 看到这张图,是一个网格图,而且有回路限制,不难想到黑白染色. 一般来说我们对一张图黑白染色之后都是黑色点向白色点连边,但是这道题往这边想似乎就想不出建图方法了,因为"一个格子强制流满 ...