On Mon, Feb 3, 2014 at 10:03 PM, Zoran Jeremic <[email protected]>wrote:

> >Unreachability and death is undistinguishable in a distributed system.
> Perhaps you should just revisit your Akka configuration?
> Do you suggest that there might be some problem that cause nodes to be
> unreachable? I'm surprised this happened so often. So far I run system 5-6
> times with 2 nodes, and each time it was working in cluster for at most 48
> hours, before one node failed. As most of the jobs are running for a couple
> of days, this means that 50% of them will fail and clustering with Akka
> won't work at all.
> Do you have any idea of alternative approach that I should apply and if
> there could be something that I should check related to so often node
> failures?
>

Have you monitored the heap usage? You might have a memory leak.
/Patrik


>
> Thanks,
> Zoran
>
>
>
> On Monday, 3 February 2014 11:46:03 UTC-8, Zoran Jeremic wrote:
>>
>> Hi,
>>
>> I'm implementing Web sites crawler using Akka clustering. I have one node
>> that plays the role of master node where cluster is initialized from the
>> ClusterControllerActor in the following way:
>>
>> int totalInstances = 2;
>>>         int maxInstancesPerNode = 1;
>>>         boolean allowLocalRoutees = true;
>>>         String useRole = null;
>>>         AdaptiveLoadBalancingPool pool = new AdaptiveLoadBalancingPool(
>>>                 MixMetricsSelector.getInstance(), 0);
>>>         ClusterRouterPoolSettings settings = new
>>> ClusterRouterPoolSettings(
>>>                 totalInstances, maxInstancesPerNode, allowLocalRoutees,
>>> useRole);
>>>         crawlerManager = getContext().actorOf(
>>>                 new ClusterRouterPool(pool, settings).props(Props.create(
>>>                         CrawlerManagerActor.class, getSelf())),
>>>                 "crawlerManager");
>>
>>
>>
>> Other nodes play the role of slaves, and each node in cluster has one
>> CrawlerManagerActor created from master node in AdaptiveLoadBalancingPool.
>> For each crawling job (Web site to be crawled) I create one job that is
>> delegated to the one of the CrawlingManagers  based on MixMetricsSelector,
>> and one job is running only on one node. CrawlerManager creates a set of
>> actors that works together on dedicated task. After the job was finished,
>> these actors are stopped and killed. This works pretty fine, until the
>> moment when slave node is disconnected from cluster. I don't know why the
>> slave node is disconnected after 24-48 hours of successful work (I'm
>> hosting it on 2 Microsoft Azure instances with Tomcat), but once this
>> happen I have a plenty of errors, e.g.:
>>
>> akka.pattern.AskTimeoutException: Recipient[Actor[akka://
>>> ClusterSystem/remote/akka.tcp/[email protected]:
>>> 2551/user/clusterController/crawlerManager/c2/$c/
>>> statisticsService#-1293629832]] had already been terminated.
>>
>>
>> statisticService that is referred here is actually running on the slave
>> node and is referred from slave node on the address xxx.xxx.xxx.66:2552,
>> but it's referred through the clusterController which is initialized on
>> master node, so StatisticServiceActor running on node xxx.xxx.xxx.66:2552
>> has the path:
>>
>> akka://ClusterSystem/remote/akka.tcp/ClusterSystem@xxx.
>>> xxx.xxx.69:2551/user/clusterController/crawlerManager/c2/$a/
>>> statisticsService
>>
>>
>> I would like to make these actors (CrawlerManager and all other nodes
>> created for each individual job and running on one node instance) to be
>> able to continue running and finishing job even if node is disconnected
>> from cluster, so this is not what I'm expecting and what I want. I'm not
>> sure if this is expected behaviour or I missed to do something, but I hope
>> somebody will have an idea how I could resolve this.
>>
>> Thanks,
>> Zoran
>>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to