Unable to acquire JDBC Connection [Acquisition timeout while waiting for new connection] [n/a]

Solution Verified - Updated -

Issue

  • When connecting to the external MySql database we get the below issue:
2025-01-15T02:23:02.688304876Z 2025-01-15 02:23:02,687 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Timer-0) SQL Error: 0, SQLState: null
2025-01-15T02:23:02.688622406Z 2025-01-15 02:23:02,688 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Timer-0) Acquisition timeout while waiting for new connection
2025-01-15T02:23:02.849741538Z 2025-01-15 02:23:02,837 ERROR [org.keycloak.services.scheduled.ScheduledTaskRunner] (Timer-0) Failed to run scheduled task ClearExpiredRevokedTokens: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection [Acquisition timeout while waiting for new connection] [n/a]

Environment

  • Red Hat build of Keycloak
    • 26.0.X
    • 26.2.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content