Skip to content

Conversation

@cccs-nik
Copy link
Member

Description

This change adds support for configuring a connection wait timeout for the Oracle connector’s connection pool.

When all connections in the pool are borrowed, connection requests can fail with UCP-45064 during bursts of queries where connections would become available shortly after. This can cause otherwise healthy workloads to fail unnecessarily.

The new catalog property, oracle.connection-pool.wait-timeout, allows connection requests to wait for a free connection for a configurable amount of time. By setting a higher wait timeout, queries can be serviced during brief bursts of high concurrency instead of occasionally failing.

Additional context and related issues

This is particularly useful for bursty workloads with many short-running queries, where brief contention on the pool can lead to query failures despite sufficient database capacity and a high maximum connection pool size, because the pool cannot always scale fast enough to handle sudden bursts.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(X) Release notes are required, with the following suggested text:

## Section
* Add support for configuring a connection wait timeout for the Oracle connection pool via the `oracle.connection-pool.wait-timeout` catalog property. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Dec 23, 2025
@github-actions github-actions bot added docs oracle Oracle connector labels Dec 23, 2025
dataSource.setValidateConnectionOnBorrow(true);
dataSource.setConnectionProperties(connectionProperties);
dataSource.setInactiveConnectionTimeout(toIntExact(inactiveConnectionTimeout.roundTo(SECONDS)));
dataSource.setConnectionWaitTimeout(toIntExact(connectionWaitTimeout.roundTo(SECONDS)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setConnectionWaitTimeout is deprecated. Can we use setConnectionWaitDuration instead?

private int connectionPoolMinSize = 1;
private int connectionPoolMaxSize = 30;
private Duration inactiveConnectionTimeout = new Duration(20, MINUTES);
private Duration connectionWaitTimeout = new Duration(5, SECONDS);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you choose 5s as the default value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants