RestTemplate + ConnectionPoolTimeoutException: Timeout waiting for connection from pool

前端 未结 3 1132
野性不改
野性不改 2020-12-30 17:11

I got this error all of a sudden in production while the application was not under any load.

The issue happened when my code tries to send the PUT message using spri

3条回答
  •  再見小時候
    2020-12-30 17:26

    The problem is the HTTP client connections aren't being closed. I had the same problem with a service that only has about 1 request per second.

    "exception":"org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool"
    

    You need to add a finally block and close the connection.

提交回复
热议问题