Hangs are always frustrating without actionable errors. Are you able to change some experimental variables to eliminate or narrow down the issue? For example:
- Does it also happen with a .NET 6 container image Lambda?
- Does it happen with .NET 8 outside of Lambda? (can you run this from an EC2 instance or development machine?)
- Does it still work fine with .NET 6 Lambda?
- Are you using native AOT?
- Would it make sense to also open an issue here: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues ?
Are you using
public.ecr.aws/lambda/dotnet:8-preview ? Or something else for the container image base?
Some other things to consider:
- Is it always the second call that hangs or always database2Context? What if you switch the order you connect to 2 then 1?
- What are the differences between DB 1 and DB 2?
- Have you done anything custom or non-default with certificates?
- If you increase the Lambda timeout to the max 15 minutes, maybe it will give the .NET code enough time to hit it's own timeout so that at least you can get a stack trace.
For what it's worth, I was able to connect to 2 different RDS MySQL databases on a VPC using the .NET 8 image Lambda using
MySqlConnector.MySqlConnection (I don't have any experience with Pomelo unfortunately). The MySQL version was v5.7.37, which is the oldest allowed in the dropdown.
I upgraded the EntityFramework packages to 8.0.2 (were 8.0.1) and Pomelo to 8.0.0 (was beta2) and now it is no longer hanging. Don't know which packages were the cause. I may try to find out.
Going back to the beta version (just for testing) did not reintroduce the problem. So we have no clue what was the actual cause of the problem
- asked 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- How can I troubleshoot the "Runtime.InvalidEntrypoint" error for my Lambda function that's from a Docker image?AWS OFFICIALUpdated a year ago