Aurora <> RDS <> Prisma: Connection Issues

0

We are seeing intermittent connection issues with RDS Proxy connections to our Aurora instance. Our setup is Prisma, RDS Proxy, and Aurora.

The errors we are seeing are as follows:

  • 57014 - query_canceled (when querying through Prisma/Lambda)
  • 57P05 - idle_session_timeout (from DBeaver SQL tool, when scrolling through table data)

Has anyone experienced this? My assumption is there is something with our configuration that is off and is not allowing connections to be reset appropriately.

asked 4 months ago263 views
2 Answers
0

If you can see/change the code of the Lambda function, check a connection timeout, for example:

// Example Prisma timeout setting
const prisma = new PrismaClient({
  datasources: {
    db: {
      url: 'mysql://username:password@proxy-endpoint/database',
      timeout: 60000 // 60 seconds
    }
  }
});

Check Aurora Parameter Group Settings

  • idle_in_transaction_session_timeout: 1h
  • statement_timeout: 60s
  • max_connections: Set according to your load requirements.

Ensure that your RDS Proxy is correctly configured to handle connection pooling and failover:

  • Max Connections: Ensure that the max_connections setting on the proxy is set to a value that can handle the expected load.
  • Target Health: Check the health of your Aurora targets in the RDS Proxy configuration to ensure they are healthy and can accept connections.
profile picture
EXPERT
answered 4 months ago
0

Appreciate the answer. I am actually not seeing that Prisma has that functionality. What docs are you referencing for that feature?

Also, are you suggesting that these settings between Prisma and Aurora/RDS are causing problems with eachother? I would be interested to hear more about this.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions