System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseMySql' call.
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Connect Timeout expired.
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Connect Timeout expired.
---> System.ObjectDisposedException: Cannot access a disposed object.
具体报错如上,我看EFCore的解决方案是增加重试机制,EfCoreSharing有重试机制的使用方法吗
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseMySql' call. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Connect Timeout expired. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Connect Timeout expired. ---> System.ObjectDisposedException: Cannot access a disposed object. 具体报错如上,我看EFCore的解决方案是增加重试机制,EfCoreSharing有重试机制的使用方法吗
环境:数据库是主主,连接字符串走的浮动IP