databaseolapapache-doris

Apache Doris query fails with "Connection is not available, request timed out" after exhausting client connection pool


We are experiencing query failures against our Apache Doris cluster. After our application runs for a period of time (several hours to a day), it begins to fail with the error Connection is not available, request timed out.

We initially tried to solve this by increasing the maximum size of our connection pool (connection_pool_max_size) to 1000. However, this only delayed the problem; the application still eventually consumes all available connections and fails. This strongly suggests a connection leak in our client application code.


Solution

  • I know this problem, you can fix it as follows:

    1. Check if there are really 1,000 connections on MySQL, and exclude whether the connection is leaked
    2. Because changing any connection pool parameters will create a new connection pool, it is likely that it has nothing to do with the number of connections.
    3. In summary, it is likely to be timeout. Increase the timeout time and observe it. https://doris.apache.org/docs/lakehouse/database/jdbc