We have a SAAS based platform with a single codebase running individual websites for clients. The client websites are automatically divided between multiple application pools. On average each application pool has 20 websites.
The software solution is .NET MVC5 hosted on AWS EC2 with RDS MySQL database. Things were working relatively fine until AWS forced us to upgrade to MySQL 8 version from the current 5.7.
As a consequence, we had to update our application to use MySql.Data 8.4 library. Since then, our websites periodically hang on MySqlConnection.Open call, and as a consequence end up hanging all websites on the application pool.
We tried several things, combinations of connection string, using async controllers to make sure we do not block the main thread, trying to catch as much data as we could to reduce database calls. While all this improved things, the issue continues with customer websites hanging all the time.
While we applied a temporary fix by automatically restarting the IIS service every few hours, this is no solution.
Can you help us resolve this issue?