4
votes

We are trying to add AWS X ray JDBC interceptor to our lambda functions and in order to add JDBC interceptor we have added Tomcat JDBC datasource with max active and max idle connection as 1. Connections are not getting reused and we are getting lot of "connection already closed error". Another pattern we observed is Lambda is taking almost 10 minutes to flush the connection from Aurora DB. Did any one successfully implemented connection pooling with Lambda.( Java 8) and RDS (Aurora).

2
how did you added xray JDBC interceptor ? I am using mysql dbKnot

2 Answers

0
votes

I've had some recent success with the latest MariaDB Connector-J and aurora failover. I've had no issues with any queries as of yet with my jdbc url like jdbc:mariadb:aurora://host:port/db?...

See https://mariadb.com/kb/en/the-mariadb-library/failover-and-high-availability-with-mariadb-connector-j/#specifics-for-amazon-aurora

I'm still working on error-free connection pooling, but I'm running into the occasional DEBUG from HikariCP about TransientConnectionError or the MariaDB Connector-J with NullPointerException

0
votes

I think your cry for connection pooling in RDS has reached AWS just now... Here you go!

RDS Proxy for Aurora/RDS has been launched recently in AWS ReInvent 2019.