AvaticaClientRuntimeException: Remote driver error: ISE: Too many connections, limit is[25]

673 views
Skip to first unread message

潘鸿

unread,
Sep 5, 2017, 5:33:58 AM9/5/17
to Druid User
HI,

druid  sql :
    
Properties connectionProperties = new Properties();
String url = "jdbc:avatica:remote:url=http://locahost:8082/druid/v2/sql/avatica/";
LOGGER.info("url:{}", url);
try {
Connection connection = DriverManager.getConnection(url, connectionProperties);
server.set(connection);
} catch (SQLException e) {
LOGGER.error("创建druid jdbc连接过程中出现异常:", e);
}

AvaticaClientRuntimeException: Remote driver error: ISE: Too many connections, limit is[25]
. Error -1 (00000) UNKNOWN

io.druid.java.util.common.ISE: Too many connections, limit is[25]
	at io.druid.sql.avatica.DruidMeta.openDruidConnection(DruidMeta.java:504)
	at io.druid.sql.avatica.DruidMeta.openConnection(DruidMeta.java:95)
	at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:299)
	at org.apache.calcite.avatica.remote.Service$OpenConnectionRequest.accept(Service.java:1750)
	at org.apache.calcite.avatica.remote.Service$OpenConnectionRequest.accept(Service.java:1730)
	at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:95)
	at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:52)
	at org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:129)
	at io.druid.sql.avatica.DruidAvaticaHandler.handle(DruidAvaticaHandler.java:63)
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:534)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)


	at org.apache.calcite.avatica.remote.Service$ErrorResponse.toException(Service.java:2476)
	at org.apache.calcite.avatica.remote.JsonService.decode(JsonService.java:55)
	at org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:172)
	at org.apache.calcite.avatica.remote.Driver.connect(Driver.java:176)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:208)
	at com.druid.QueryTest112.groupBy(QueryTest112.java:108)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Gian Merlino

unread,
Sep 5, 2017, 12:13:10 PM9/5/17
to druid...@googlegroups.com
It means that there are too many concurrent connections open. There's a limit since each one requires some resources on the broker to keep open. If you need more than the default, you can raise druid.sql.avatica.maxConnections. Also make sure you're using Druid 0.10.1, since it has some improvements around cleaning up stale connections that will help here.

Gian

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+unsubscribe@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/7d03bbf7-4434-40f6-820c-1649c267870b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages