- Newest
- Most votes
- Most comments
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
or 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
Relevant content
- asked 10 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
I was hoping to actually include the Pomelo source code into my project, hoping I could add some existing debug information. But I could not get the github package compiled. Thanks Beau, for the suggestions.