Skip to content

Conversation

marcogramy
Copy link

@marcogramy marcogramy commented May 9, 2024

The purpose of the PR is to add logic to allow automatic reconnection after a certain period of time, before executing a query.

This strategy avoids reusing a connection that has been idle for a long time and add support for AWS RDS proxy and AWS serverless, because for long lived connection the AWS RDS proxy requires that the TCP connection is re-established in 24 hours, otherwise it is dropped with errors:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-managing.html

From AWS documentation:

Client connection max life: RDS Proxy enforces a maximum life of client connections of 24 hours. This value is not configurable. Configure your pool with a maximum connection life less than 24 hours to avoid unexpected client connection drops.
Aurora Serverless v1 closes connections that are older than 24 hours. Make sure that your connection pool refreshes connections frequently.

A new property 'regenerateConnectionTimeout' has been added to control the time interval that must elapse before performing a reconnection. If the value of the property is zero, no reconnection is performed.

@marcogramy marcogramy marked this pull request as ready for review May 9, 2024 15:32
@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@marcogramy
Copy link
Author

I've signed the Oracle Contribution Agreement just now

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@marcogramy
Copy link
Author

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=115065 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants