KB-2184 "java.sql.SQLException: Unable to obtain a connection within configured timeout" observed in application server log


The following exception appears in the tomcat-stdOut.log file:

Caused by: java.sql.SQLException: Unable to obtain a connection within configured timeout

In cases where this exception is encountered regularly, application features that interact with databases may experience degraded performance. This can manifest in a number of ways, ranging from user-facing application slowness to frequently failing process model execution.


The application server was unable to establish a connection to the business database within the default 10 second timeout. The timeout is in place to prevent the application from locking up if a large number of threads are blocked waiting for a database connection to initialize. In many cases, this error message is a symptom of an unreliable network configuration between the web server and the database, rather than an issue localized to either of those components.


Work with your database administrators, network operations team, and/or Appian Support to verify the reliability of the network connection between the application server and the database instance.


In cases when the network conditions or database responsiveness cannot be improved, increase or disable the connection timeout properties. 

DISCLAIMER: These properties only affect the way the application server reacts to slow connection attempts. Without addressing the underlying issues, modifications to these values may degrade application performance.


  1. Modify or add the following properties to the custom.properties file:
    • conf.data.datasources.internal.CONNECTION_TIMEOUT_MS=<time in milliseconds>
    • conf.data.datasources.internal.connectionTimeout.enabled=false
  2. Restart the application server.
  • There is no "correct" value for the CONNECTION_TIMEOUT_MS property. Choose a value based on tolerance for latency. The default value is 10000.
  • If the connectionTimeout.enabled property is set to false, the timeout above is ignored. The default value is true.


Open a case with Appian Support to request a change to these values. A site restart will be required to apply the configuration changes.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: May 2021