title: OrientDB - reached maximum pool size for given partition (with JDBC)
body: <p>Good evening,</p>
  
  <p>I have a server which queries an OrientDB database using the JDBC connector:</p>
  
  <pre><code>        Connection _connection = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:remote:" + host + "/" + dbName, user, password);
  </code></pre>
  
  <p>I've set script.pool.maxSize = 50. Whenever I do a query, e.g:</p>
  
  <pre><code>Statement stmt = connection.createStatement();
  ResultSet results = stmt.executeQuery("select getRouteWithAttributes('" + sessionID + "') as route");
  stmt.close(); 
  </code></pre>
  
  <p>I can see it by consulting LIST CONNECTIONS, like in the figure below(7 queries where made just before the snapshot):</p>
  
  <p><a href="https://i.stack.imgur.com/qVxJn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qVxJn.png" alt="LIST CONNECTIONS"></a> </p>
  
  <p>But if I keep on querying the system, the active connections list will increase and each query will remain in the list for approximately a minute. So when more than 50 queries are done, I get "java.lang.IllegalStateException: You have reached maximum pool size for given partition".</p>
  
  <p>What is the best approach to take here? Increasing the db.pool.size parameter to huge values does not seem very correct...</p>
  
  <p>Thanks in advance!</p>