- Newest
- Most votes
- Most comments
For your "too many connections" errors:
This issue could be occurring despite your metrics showing only 120 connections when your max_connections parameter is set to 1000. There are several possible explanations:
-
Connection leaks in your application: Your application might not be properly closing connections, leading to a buildup of idle connections that aren't actively being used but still count against your limit.
-
Inefficient connection pooling: If your application isn't using connection pooling effectively, it might be creating too many new connections rather than reusing existing ones.
-
Temporary connection spikes: Brief spikes in connection attempts might occur between your monitoring intervals, causing the error without being captured in your metrics.
-
Connection distribution: If you have multiple instances in your Aurora cluster, the connections might not be evenly distributed, causing one instance to reach its limit while the overall cluster appears to have capacity.
For your storage issues with the slow query logs:
The error about the mysql-slowquery.log file is related to local storage constraints, not the Aurora cluster storage. While Aurora storage does automatically scale for your database data, each DB instance has a fixed amount of local storage for logs and temporary files. This local storage doesn't automatically scale.
The slow query logs are being stored on the local instance storage, and it appears this storage is filling up. When this happens, Aurora will delete older log files to make space, which is what the message is indicating.
To address these issues:
For connection issues:
- Implement proper connection pooling in your application
- Check for and fix any connection leaks
- Monitor connections more frequently to catch potential spikes
For storage issues:
- Consider reducing the retention period for slow query logs
- Export logs to CloudWatch Logs more frequently
- Monitor the FreeLocalStorage CloudWatch metric
- Optimize queries that might be generating large temporary tables or excessive logging
Sources
Troubleshooting connection issues for Aurora MySQL databases - Amazon Aurora
Troubleshoot table errors and storage full issues in Aurora My-SQL Compatible databases | AWS re:Post
Amazon CloudWatch Database Insights applied in real scenarios | AWS Database Blog
Relevant content
- AWS OFFICIALUpdated 2 months ago
