Hi,
we are using Akka.Net version 1.3.12 on production with clustering and SqlServer persistence.
Application is hosted as a service on Windows server with target framework net461.
Even after the fix of https://github.com/akkadotnet/Akka.Persistence.SqlServer/issues/104 we still encountered an issue, that persistent actors could not start after the planned DB maintenance end. The only solution for us was to restart actor systems in whole cluster via pbm.
In logs we have found following errors related to SnapshotStore:
I have visually debugged the SqlServerSnapshotStore code and found two issues there, which probably caused the actor to stop:
If the DB becomes unavailable and saving snapshot fails so many times that circuit breaker opens, this line of code will immediately throw even without awaiting the task. This causes the actor to restart. Issue 2 happens afterwards
Now the whole actor system is screwed, since all new persistent actors can not start.
Fix could be following:
This is a duplicate of https://github.com/akkadotnet/akka.net/issues/3665, but you may close the original ticket as there is more info here (or I can copy over the details from the other).
Thanks! I'll be looking into this.
@ondrejpialek @balcko so the issue with the CircuitBreaker described in solution 1 was already addressed and fixed in Akka.NET v1.3.13: https://github.com/akkadotnet/akka.net/pull/3754 - I'd strongly recommend upgrading to 1.3.14 to get the latest fixes there.
I can work on the back-off issue with auto-initialize = on as that fix has merit on its own, but an immediate fix is available.
We turned off auto-initialize on staging and production so no longer affected by that problem (which made the issue more prevalent I guess?).
We did not encounter these issues since turning that off, but seeing the CircuitBreaker is still susceptible we will update soon :) Thanks!
Great, thanks, we will update to the latest version.
Regarding the auto-initialization, it is not that critical, but would be nice to have it for the future,thanks.
Most helpful comment
@ondrejpialek @balcko so the issue with the
CircuitBreakerdescribed in solution 1 was already addressed and fixed in Akka.NET v1.3.13: https://github.com/akkadotnet/akka.net/pull/3754 - I'd strongly recommend upgrading to 1.3.14 to get the latest fixes there.I can work on the back-off issue with
auto-initialize = onas that fix has merit on its own, but an immediate fix is available.