I have service which creates Actors of some type by some name:
var storer = this.serviceClient.Create<IStorer>(new ActorId(agencyToProcess.Name));
and then I call Actor's method.
await storer.StoreStatusesAsync().ConfigureAwait(false);
On this call I receive error :
System.AggregateException: One or more errors occurred. ---> Microsoft.ServiceFabric.Actors.ActorConcurrencyLockTimeoutException: Acquisition of turn based concurrency lock for actor 'actorName' timed out after 00:01:13.6480000. at Microsoft.ServiceFabric.Actors.Runtime.ActorConcurrencyLock.d__17.MoveNext()
I can't understand what this erorr means and how to fix it.
This problem doesn't happen everytime. (20 times out of 100).
[ServiceDescription("Storer", ServicePrefix = "MyApp")]
public interface IStorer : IActor
{
Task StoreStatusesAsync();
}
This services are created in Observer. There are code full code which creates actors in observer.
public async void OnNext(AgencyModel agencyToProcess)
{
try
{
var storer = this.serviceClient.Create<IStorer>(new ActorId(agencyToProcess.Name));
await storer.StoreStatusesAsync().ConfigureAwait(false);
}
catch (Exception exception)
{
this.Logger.Error(exception);
}
}