Improve JDBC connection pool settings & retries

Description

This results in next exceptions. Note postgresql exception on setTransactionIsolation call, first call we make:

We should fix it by enabling connection testing on borrowing in dbcp. Generally it would be great to be able to override any dbcp property from cdap-site/cdap-default.

As a workaround one can set tcp_keepalives_idle jdbc property to ensure connection is kept alive (see )

Release Notes

n/a

Activity

Show:

Vitalii Tymchyshyn October 25, 2022 at 12:28 AM

We should also consider adding retries for CloudSQL IO errors in io.cdap.cdap.spi.data.sql.RetryingSqlTransactionRunner#RetryingSqlTransactionRunner. Note that delays would need to be increased a lot to handle the downtime

Vitalii Tymchyshyn October 21, 2022 at 10:55 PM

Note: keepalive won’t help in case of DB server restarts

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Triaged

Yes

Components

Fix versions

Due date

Priority

Created October 21, 2022 at 9:57 PM
Updated December 9, 2022 at 5:51 PM
Resolved November 2, 2022 at 5:38 PM