Timed out waiting for a free available connection. (SQLState=08001, ErrorCode=0)

goldenMoon 发布于 2017/10/18 17:17
阅读 3K+
收藏 0

storm向hive写数据,topology运行一段时间后,hive.log就会出现这个错误
2017-10-18T10:43:37,786 ERROR [pool-6-thread-197] txn.TxnHandler: There is a problem with a connection from the pool, retrying(rc=2): Timed out waiting for a free available connection. (SQLState=08001, ErrorCode=0)
java.sql.SQLException: Timed out waiting for a free available connection.
at com.jolbox.bonecp.DefaultConnectionStrategy.getConnectionInternal(DefaultConnectionStrategy.java:88) ~[bonecp-0.8.0.RELEASE.jar:?]
at com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:90) ~[bonecp-0.8.0.RELEASE.jar:?]
at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:553) ~[bonecp-0.8.0.RELEASE.jar:?]

at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:131) ~[bonecp-0.8.0.RELEASE.jar:?]
at org.apache.hadoop.hive.metastore.txn.TxnHandler.getDbConn(TxnHandler.java:1786) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.txn.TxnHandler.commitTxn(TxnHandler.java:603) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.commit_txn(HiveMetaStore.java:5966) [hive-exec-2.1.1.jar:2.1.1]
    at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:140) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99) [hive-exec-2.1.1.jar:2.1.1]
    at com.sun.proxy.$Proxy18.commit_txn(Unknown Source) [?:?]
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$commit_txn.getResult(ThriftHiveMetastore.java:13802) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$commit_txn.getResult(ThriftHiveMetastore.java:13786) [hive-exec-2.1.1.jar:2.1.1]
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) [hive-exec-2.1.1.jar:2.1.1]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_67]
    at javax.security.auth.Subject.doAs(Subject.java:415) [?:1.7.0_67]
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) [hadoop-common-2.7.1.jar:?]
at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) [hive-exec-2.1.1.jar:2.1.1]
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) [hive-exec-2.1.1.jar:2.1.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_67]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_67]

mysql的最大连接数1000  ,hive的maxOpenConnections = 980   
是否是hiveserver2连接数不够,参照
http://blog.csdn.net/tomson8975/article/details/49465527
将hive.server2.thrift.max.worker.threads调到2000
将hive.server2.async.exec.threads调到了300
还是报错,有没有遇到的,任何建议不胜感激!!

加载中
返回顶部
顶部