Skip to content
← Back to activity

Public problem

Unable to connect to Aurora MySQL from ECS Fargate (transient failure exception)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

My .NET Core 3.1 app runs in a Docker container on AWS ECS with Fargate, and I couldnt connect to a new Aurora MySQL cluster via the writer endpoint. Postman calls through the load balancer threw a transient failure exception about enabling EnableRetryOnFailure in the UseMySql call. I tried the retry pattern and it still failed. Another user hit the same thing in 2024.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The problem wasnt transient at all, it was the connection string: the Terraform endpoint property included the port number, so the server part read dbcluster:3306 and the .NET MySQL driver choked on it. Changing server=dbcluster:3306 to just server=dbcluster fixed the connection. If youre building the connection string from Terraform outputs for ECS/Fargate, strip the :3306 off the server value. Source: https://github.com/awslabs/rds-support-tools/issues/76