These are chat archives for akkadotnet/akka.net

2nd
Jun 2016
Bart de Boer
@boekabart
Jun 02 2016 00:00
... please forget anything I said above... I use persistence in one of these actors, and persistence still runs on the default dispatcher.
Bart de Boer
@boekabart
Jun 02 2016 00:26
Still 'deadlocks' but I suspect that's because Sqlite plugin somewhere does something on the threadpool too
Bart de Boer
@boekabart
Jun 02 2016 00:37
Read the thing over and over, still can't figure out how to change the default dispatcher in Hocon. Help!
it's not akka.actor.default-dispatcher = my-dispatcher (nullReferenceException)
Bart de Boer
@boekabart
Jun 02 2016 00:52
is the only way akka.actor.deployment{"/*"{ dispatcher = my-dispatcher }} ?
Bart de Boer
@boekabart
Jun 02 2016 01:06
.. and that works only for 1 level ..
MrR0b0t
@MMrR0b0TT
Jun 02 2016 02:30
Hi guys, I'm new on Akka and I have a doubt.
How could I take this exception in the parent (PersonActor) and make my Schedule stop running?
This message was deleted
  public class PersonRunningActor : ReceiveActor
        {
            public PersonRunningActor()
            {
                Receive<PersonMessage>((msg) =>
                {
                    Context.System.Log.Info("PersonRunning receive");

                    if (msg.Idade > 30)
                        throw new Exception("Erro");
                });
            }
        }

        public class PersonActor : ReceiveActor
        {
            public PersonActor()
            {
                Receive<PersonMessage>((msg) =>
                {
                    Context.GetLogger().Info("Person receive");
                    var runningActor = Context.ActorOf<PersonRunningActor>("runningActor");
                    Context.System.Scheduler.ScheduleTellRepeatedly(TimeSpan.Zero, TimeSpan.FromSeconds(2), runningActor, msg, Self);
                });

                ReceiveAny((msg) =>
                {
                    Context.GetLogger().Info(msg.ToString());
                });
            }
        }
MrR0b0t
@MMrR0b0TT
Jun 02 2016 02:36
This message was deleted
MrR0b0t
@MMrR0b0TT
Jun 02 2016 02:45
Actually, I did something here.
I create the "protected override SupervisorStrategy SupervisorStrategy()", I created an ICancelable and I used it inside my decider of SupervisorStrategy().
Is it a good practice? or anyone have some suggestion? thank you all
Aaron Stannard
@Aaronontheweb
Jun 02 2016 03:41
@boekabart you'll want to ask @JeffCyr but I think he's on vacation for a bit
Aaron Stannard
@Aaronontheweb
Jun 02 2016 05:33
I think #2025 should take care of some major rejoin issue stuff with Akka.Cluster
I've moved onto looking into some issues with clustered routers for now
Bartosz Sypytkowski
@Horusiath
Jun 02 2016 06:30
@tjaskula F# actors don't try to synchronize between themselves in any way. If your actor function captures some variable from outer scope, standard race risks apply. So if data you refer to is thread safe to use, or your actor is the only component using it, you're good to go.
@mkanker ScheduleTellRepeatedly has version returning ICancellable object, which you can use to cancel the scheduled interval. Usually a good place to cancel it is overriden PostStop method which is always invoked when actor is stopped or restarted.
Bart de Boer
@boekabart
Jun 02 2016 11:51
In actor.deployment, it seems to be impossible to use actor paths that contain a dot:
akka.actor.deployment { "/somename/process.text/*" { dispatcher = cpc-dispatcher }
crashes startup horribly . Removing the dot in the actor name solves it. This is the stacktrace:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Akka.Actor.Deployer.ParseConfig(String key, Config config) at Akka.Remote.RemoteDeployer.ParseConfig(String key, Config config) at Akka.Actor.Deployer.<>c__DisplayClass3_0.<.ctor>b__1(KeyValuePair`2 x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at Akka.Actor.Deployer..ctor(Settings settings) at Akka.Remote.RemoteActorRefProvider..ctor(String systemName, Settings settings, EventStream eventStream) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Akka.Actor.Internal.ActorSystemImpl.ConfigureProvider() at Akka.Actor.Internal.ActorSystemImpl..ctor(String name, Config config)
Is this simply a hocon spec limitation, it 'parses' the dot as it would normally, or is it an implementation bug and should it be taken literally because it's between quotes?
Bart de Boer
@boekabart
Jun 02 2016 12:05

The spec ( https://github.com/typesafehub/config/blob/master/HOCON.md#path-expressions ) says

When concatenating the path expression, any . characters outside quoted strings are understood as path separators, while inside quoted strings . has no special meaning. So foo.bar."hello.world" would be a path with three elements, looking up key foo, key bar, then key hello.world.

Implying that my piece of config should be accepted, am I right?

boekabart @boekabart intends to fix this on the upcoming 4 hour train ride ;)
JaspritBola
@JaspritBola
Jun 02 2016 12:12
@Aaronontheweb downing a node looks fine on 1.0.8 when it's a regular association failure. I'll leave it with a failing association to see if I can recreate the Association failure ---> System.OutOfMemoryException
Vagif Abilov
@object
Jun 02 2016 13:21
@corneliutusnea I set up Visualizer according to the doc file but don't seem to get a Web site on localhost:8085 (I created URL reservation for that). Is the source code for it available on GitHub or somewhere?
Aaron Stannard
@Aaronontheweb
Jun 02 2016 15:53
@JaspritBola as for the OOM stuff
couple of possible causes
the old Helios 1.4.1 transport, which 1.0.8 still uses but is being replaced in 1.1
definitely had some memory leak issues
other possibility
@danthar has been researching this issue, but we know for certain there's an issue with memory leaks in the logging system; haven't found the source of them yet
it's not clear when or how it occurs
but basically the log events, under some conditions, aren't able to be GCed properly
he's been looking into it so he might know better than I do
the current nightly builds
which use the new transport
don't have that issue at the Helios level
and are much more performant over all
Pavel Knorr
@knorrus
Jun 02 2016 18:10
Hi everyone! Have a small question: currently, I'm working on implementation of custom Akka .Monitoring (integration with Graylog) and as far as I understand AbstractActorMonitoringClient is not thread safe, e.g. several actors may call let's say UpdateCounter simultaneously, so I should take my own care with multi-threading and perform locking or something like this?
Jeff Cyr
@JeffCyr
Jun 02 2016 18:15
@boekabart When the threads are waiting on unfairsemaphore.wait, they are idle not deadlocked
Bart de Boer
@boekabart
Jun 02 2016 21:43
yeah, got that...