These are chat archives for akkadotnet/akka.net

1st
Dec 2017
Vagif Abilov
@object
Dec 01 2017 07:48
Thanks @Horusiath. Then we will probably have to stay with Quartz. Quartz has a notion of message group or topic, and we need to be able to manage scheduled message for particular message group.
jalchr
@jalchr
Dec 01 2017 08:27
I'm getting the following:
2017-11-30 16:02:35,080 [21] ERROR Akka.Cluster.Sharding.PersistentShardCoordinator - Exception in ReceiveRecover when replaying event type [Akka.Cluster.Sharding.PersistentShardCoordinator+ShardHomeAllocated] with sequence number [762] for persistenceId [/system/sharding/FileHandlerCoordinator/singleton/coordinator]
System.ArgumentException: Shard 2 is already allocated
Parameter name: e
   at Akka.Cluster.Sharding.PersistentShardCoordinator.State.Updated(IDomainEvent e)
   at Akka.Cluster.Sharding.PersistentShardCoordinator.ReceiveRecover(Object message)
   at Akka.Persistence.Eventsourced.<RecoveryStarted>b__90_0(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Persistence.Eventsourced.<>c__DisplayClass92_0.<Recovering>b__0(Receive receive, Object message)
Anything I'm doing wrong ?
Then this:
2017-11-30 16:02:59,440 [27] WARN  Akka.Cluster.Sharding.ShardRegion - Trying to register to coordinator at [/system/sharding/FileHandlerCoordinator/singleton/coordinator], but no acknowledgement. Total [8] buffered messages.
zbynek001
@zbynek001
Dec 01 2017 11:06
@jalchr that means your persisted data for sharding is corrupted
it can happen when using the default IActorRef serialization
cyril andreichuk
@andreichuk
Dec 01 2017 11:25
@Horusiath #3188 #3203 could we please discuss those issues here? they are pretty important for a project i work on so i would like to contribute and get them fixed as soon as possible
jalchr
@jalchr
Dec 01 2017 11:35
@zbynek001 mmm ... it seems so. What caused the corruption ? Is it a bug in Akka persistence ?
zbynek001
@zbynek001
Dec 01 2017 11:58
@jalchr what happens is that sometimes instead of e.g. this address: "akka.tcp://engine@127.0.0.1:24710/system/sharding/shardingtype#376727511" this will be stored: "akka://engine/system/sharding/shardingtype#376727511". So basically the address of the system is lost. And during recover, those two values do not match...
zbynek001
@zbynek001
Dec 01 2017 13:04
@jalchr created issue for it akkadotnet/akka.net#3204
Carlos Torrecillas
@CarlosTorrecillas
Dec 01 2017 13:48

@Aaronontheweb my configuration is:

<akka> <hocon> <![CDATA[ akka { actor { provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster" deployment { /amqppublisheractor { router = smallest-mailbox-pool nr-of-instances = 1 } /httppublisheractor { router = smallest-mailbox-pool nr-of-instances = 1 } } debug { receive = on autoreceive = on lifecycle = on event-stream = on unhandled = on } serializers { json = "Akka.Serialization.NewtonSoftJsonSerializer" bytes = "Akka.Serialization.ByteArraySerializer" hyperion = "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion" } serialization-bindings { "System.Byte[]" = bytes "System.Object" = hyperion "MyClass, MyAsembly" = json "MyOtherClass, MyAsembly" = json } } cluster {

    # Enable/disable info level logging of cluster events
    log-info = on

    periodic-tasks-initial-delay = 1s
    gossip-interval = 1s
    gossip-time-to-live = 2s
    leader-actions-interval = 1s
    unreachable-nodes-reaper-interval = 1s
    publish-stats-interval = off
    use-dispatcher = ""
    gossip-different-view-probability = 0.8
    reduce-gossip-different-view-probability = 400

    #will inject this node as a self-seed node at run-time
    seed-nodes = ["akka.tcp://mycluster@127.0.0.1:33400"]
    roles = ["interfacemanager"]
    pub-sub {
      # Actor name of the mediator actor, /system/distributedPubSubMediator
      name = distributedPubSubMediator

      # Start the mediator on members tagged with this role.
      # All members are used if undefined or empty.
      role = ""

      # The routing logic to use for 'Send'
      # Possible values: random, round-robin, broadcast
      routing-logic = round-robin

      # How often the DistributedPubSubMediator should send out gossip information
      gossip-interval = 1s

      # Maximum number of elements to transfer in one message when synchronizing the registries.
      # Next chunk will be transferred in next round of gossip.
      max-delta-elements = 3000

      # The id of the dispatcher to use for DistributedPubSubMediator actors. 
      # If not specified default dispatcher is used.
      # If specified you need to define the settings of the actual dispatcher.
      use-dispatcher = ""
    }
}
remote {
    log-remote-lifecycle-events = on
    log-received-messages = on
    helios.tcp {
        transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
        applied-adapters = []
        transport-protocol = tcp
        #will be populated with a dynamic host-name at runtime if left uncommented
        #public-hostname = "POPULATE STATIC IP HERE"
        hostname = "127.0.0.1"
        port = 33402
        maximum-frame-size = 12800000b
    }
}  
loggers = ["Akka.Logger.log4net.Log4NetLogger, Akka.Logger.log4net"]
stdout-loglevel = INFO
loglevel = INFO
log-config-on-start = on

}
]]>
</hocon>
</akka>`

Carlos Torrecillas
@CarlosTorrecillas
Dec 01 2017 13:54

the error I'm getting:

Akka.Event.DummyClassForStringSources - Failed to write message to the transport Akka.Remote.EndpointException: Failed to write message to the transport ---> System.NullReferenceException: Object reference not set to an instance of an object. at Hyperion.SerializerFactories.DictionarySerializerFactory.<>c__DisplayClass3_0.<BuildSerializer>b__1(Stream stream, Object obj, SerializerSession session) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at lambda_method(Closure , Stream , Object , SerializerSession ) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at Hyperion.SerializerFactories.DefaultDictionarySerializerFactory.<>c__DisplayClass3_0.<BuildSerializer>b__1(Stream stream, Object obj, SerializerSession session) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at Hyperion.SerializerFactories.ArraySerializerFactory.WriteValues[T](T[] array, Stream stream, Type elementType, ValueSerializer elementSerializer, SerializerSession session) at CallSite.Target(Closure , CallSite , ArraySerializerFactory , Object , Stream , Type , ValueSerializer , SerializerSession ) at Hyperion.SerializerFactories.ArraySerializerFactory.<>c__DisplayClass4_0.<BuildSerializer>b__1(Stream stream, Object arr, SerializerSession session) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at lambda_method(Closure , Stream , Object , SerializerSession ) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at Hyperion.SerializerFactories.ArraySerializerFactory.WriteValues[T](T[] array, Stream stream, Type elementType, ValueSerializer elementSerializer, SerializerSession session) at CallSite.Target(Closure , CallSite , ArraySerializerFactory , Object , Stream , Type , ValueSerializer , SerializerSession ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid6[T0,T1,T2,T3,T4,T5](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) at CallSite.Target(Closure , CallSite , ArraySerializerFactory , Object , Stream , Type , ValueSerializer , SerializerSession ) at Hyperion.SerializerFactories.ArraySerializerFactory.<>c__DisplayClass4_0.<BuildSerializer>b__1(Stream stream, Object arr, SerializerSession session) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session) at lambda_method(Closure , Stream , Object , SerializerSession ) at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session) at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveO

stevemesser
@stevemesser
Dec 01 2017 18:04

Looking for guidance concerning Router pool size vs CPU cores

My application has two actors that do most of the work.
The server has 16 cores.

  1. DataStore actor (talks to the database)
  2. Editor actor that calls the DataStore actor twice per patient and does lots of processing

Each are behind a RoundRobin Router.

I have set up each to use a Resizer.

I was thinking of making each have a DefaultResizer(1, 16)

Has anyone written about this?
It there any guidance for this or is it just trial and error?

Paladin
@DeepChipolino_twitter
Dec 01 2017 18:27
Is there a way to read events from read journal by date stamp of events?
Bartosz Sypytkowski
@Horusiath
Dec 01 2017 19:44
@andreichuk I'll fix recursive call tomorrow. WSAWOULDBLOCK requires a bit different approach I think - I'm not sure if using scheduler in this context is fast enough
@DeepChipolino_twitter event journal is only source of truth. If you need a view in some specialized context (like timeline), it's better to use Akka.Persistence.Query and to replay event journal into some dedicated data structure (even separate SQL table)
@CarlosTorrecillas looks like you're trying to pass some very weird object on the remote endpoint - Hyperion couldn't serialize it
Sam 塞缪尔
@contactsamie
Dec 01 2017 22:08
A quick question - So I have an actor that has a receiveAsync , but sometimes the async method I am calling inside it 'blocks' as in, it never returns, so that makes that actor unable to receive any new messages. essentially the actor is frozen . Does any one have any idea how to recover from such a situation? Thanks