关于mysql报 loopWaitCount 0, wait millis 60000 错误的解决办法

news/2024/11/6 7:15:24/

最近遇到个比较奇怪的问题,用户的网站百万级访问量,最近没有修改程序,也没有改过其他地方,最近总是运行20几个小时左右tomcat就假死一次,访问无响应!!经常过检查 日志发现 里面报了一个错误

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
com.alibaba.druid.pool.GetConnectionTimeoutException: loopWaitCount  0 , wait millis  60000
     at com.alibaba.druid.pool.DruidDataSource.pollLast(DruidDataSource.java: 1076 )
     at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java: 756 )
     at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java: 644 )
     at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java: 4530 )
     at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java: 659 )
     at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java: 4526 )
     at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java: 626 )
     at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java: 618 )
     at com.sanyuan.dao.DBConnection.getConnection(DBConnection.java: 267 )
     at com.sanyuan.dao.DBAccess.setPreparedSQL(DBAccess.java: 65 )
     at com.clsoftware.sms.manager.SmsSenderLogManager.getTop1LogListByCondition(SmsSenderLogManager.java: 641 )
     at org.apache.jsp.superadmin.sms.autoCheckInfor_jsp._jspService(autoCheckInfor_jsp.java: 72 )
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java: 70 )
     at javax.servlet.http.HttpServlet.service(HttpServlet.java: 717 )
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 388 )
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 313 )
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java: 260 )
     at javax.servlet.http.HttpServlet.service(HttpServlet.java: 717 )
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290 )
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206 )
     at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java: 413 )
     at com.clsoftware.filter.MyFilterDispatcher.doFilter(MyFilterDispatcher.java: 162 )
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 235 )
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206 )
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233 )
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191 )
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 127 )
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 102 )
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109 )
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 291 )
     at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java: 190 )
     at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java: 291 )
     at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java: 776 )
     at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 705 )
     at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java: 898 )
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java: 690 )
     at java.lang.Thread.run(Thread.java: 619 )

 

loopWaitCount 0, wait millis 60000  一看字面意思就是数据库有问题了....找了N久才发现不是数据库的问题...

 

原来用户用了数据库连接池,由于我们的诶个虚拟主机都有数据库并发的限制,用户把数据库连接池最大连接数设置为50 , 造成了数据库连接池不够用,通知用户,增加数据库连接池后,重启tomcat恢复正常!!

 


http://www.ppmy.cn/news/601608.html

相关文章

Kafka问题(3):Failed to allocate memory within the configured max blocking time 60000 ms

记录kafka出现的问题,原因,与对应场景下的解决方案. 造成问题方式有很多种,这里只是记录遇到的或已知的,若有遗漏情况欢迎补充 由于问题很多出现在生产环境,故敏感信息已屏蔽,不影响问题介绍 文章目录 环境…

com.alibaba.druid.pool.GetConnectionTimeoutException:loopWaitCount 0, wait millis 60000,active 50

druid异常—— Caused by: com.alibaba.druid.pool.GetConnectionTimeoutException: loopWaitCount 0, wait millis 60000, active 50at com.alibaba.druid.pool.DruidDataSource.pollLast(DruidDataSource.java:1375)at com.alibaba.druid.pool.DruidDataSource.getConnectio…

关于org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.问题的解决

关于org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.问题的解决 今天在测试自己编写的kafka消息发送接收小例子时,一直报org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 …

kafka连接异常org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.

前言:网上很多说是hosts的问题,我经过测试发现不是,经过我自己测试,介绍三种针对大部分问题的解决方法 1.未开放防火墙端口或关闭防火墙 防火墙一般本地测试才会关闭,线上一般都是开启的,建议还是添加端口…

canal Failed to update metadata after 60000 ms 等问题解决

问题排查了一天,很长 问题描述: 需求 需要将mysql数据通过canal传入kafka 测试将正则匹配的表按照字段动态存入不同topic中 例如存在两类表 A_1 , A_2 , A_3 , B_1 , B_2 , B_3 A类表 -> topic_1 B类表 -> topic_2 canal最初对应配置如下 cana…

DataNode日志出现 60000 millis timeout while waiting for channel to be ready for read. ch

DataNode是Hadoop分布式文件系统(HDFS)中的节点,它负责存储文件系统中的数据块并处理来自客户端的数据读写请求。 如果在DataNode日志中出现“60000 millis timeout while waiting for channel to be ready for read. ch”,这意味着DataNode在等待与客户…

HBase RIT异常分析及其解决方案, region(s)in transistion for more than 60000 milliseceonds

最近的一段时间,HBase集群突然出现了一些异常,偶尔部分机器会出现RIT的情况, Region-In-Trasition机制 HBase在RegionState类中定义了Region的主要状态,主要有如下: 定义了四种会触发Region状态变迁的操作以及操作对应…

记一次连接泄漏GetConnectionTimeoutException: wait millis 60000, active 20, maxActive 20, creating 0

com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 20, maxActive 20, creating 0 活动的连接数为20, 最大的连接数为20, 活动的连接数与最大连接数相同,连接池用完了,在等待60秒后,…