You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Devis Balsemin <de...@flexvalley.com> on 2017/02/17 20:45:58 UTC

Timeout was reached before computation completed

Hello 
I have set RoundRobinLoadBalancingSpi.

I have a RestFul calls 
IgniteCompute compute = ignite.compute().withTimeout(25*1000).withAsync();
compute.call(new RestClusterTask(.....)

"RestClusterTask implements IgniteCallable"

Inside RestClusterTask calls a second Service(LWMServerService implments
Service) into a cluster.


My Restful "response" works in this way:

ComputeTaskFuture<List<TuplePayload<ErrorPayload, LWMResponsePayload>>> fut
= compute.future();
			fut.get(10,
TimeUnit.SECONDS).parallelStream().forEach(tuplePayload -> {
	
payloads.add(LaraPayload.tuple(tuplePayload));
			});




When RestClusterTask  and LWMServerService runs on the same machine
10.1.1.231 all works fine
               
2017-02-17 21:35:58,747 | INFO  | TEST-ENVIROMENT% | RestClusterTask
| 216 - org.flexvalley.ecosystem.management - 1.0.2.SNAPSHOT |
iClusterService load on node TcpDiscoveryNode
[id=3937dfe6-fdaa-4345-a760-5e85d472a613, addrs=[0:0:0:0:0:0:0:1%lo,
10.1.1.231, 10.1.1.240, 127.0.0.1], sockAddrs=[/10.1.1.231:47500,
/0:0:0:0:0:0:0:1%lo:47500, /10.1.1.240:47500, /127.0.0.1:47500],
discPort=47500, order=8, intOrder=5, lastExchangeTime=1487363758640,
loc=true, ver=1.8.0#19700101-sha1:00000000, isClient=false]
2017-02-17 21:35:58,754 | INFO  | TEST-ENVIROMENT% | LWMServerService
| 183 - org.flexvalley.ecosystem.lwmserver - 1.0.2.SNAPSHOT |
iClusterService load on node TcpDiscoveryNode
[id=3937dfe6-fdaa-4345-a760-5e85d472a613, addrs=[0:0:0:0:0:0:0:1%lo,
10.1.1.231, 10.1.1.240, 127.0.0.1], sockAddrs=[/10.1.1.231:47500,
/0:0:0:0:0:0:0:1%lo:47500, /10.1.1.240:47500, /127.0.0.1:47500],
discPort=47500, order=8, intOrder=5, lastExchangeTime=1487363758640,
loc=true, ver=1.8.0#19700101-sha1:00000000, isClient=false]



But when 
2017-02-17 21:42:59,731 | INFO  | TEST-ENVIROMENT% | RestClusterTask
| 216 - org.flexvalley.ecosystem.management - 1.0.2.SNAPSHOT |
iClusterService load on node TcpDiscoveryNode
[id=cf414160-d055-45ae-9bb8-c760b9e437aa, addrs=[0:0:0:0:0:0:0:1%lo,
10.1.1.230, 10.1.1.240, 127.0.0.1], sockAddrs=[/10.1.1.230:47500,
/0:0:0:0:0:0:0:1%lo:47500, /10.1.1.240:47500, /127.0.0.1:47500],
discPort=47500, order=10, intOrder=6, lastExchangeTime=1487364179049,
loc=true, ver=1.8.0#19700101-sha1:00000000, isClient=false]

2017-02-17 21:42:59,741 | INFO  | TEST-ENVIROMENT% | LWMServerService
| 183 - org.flexvalley.ecosystem.lwmserver - 1.0.2.SNAPSHOT |
iClusterService load on node TcpDiscoveryNode
[id=3937dfe6-fdaa-4345-a760-5e85d472a613, addrs=[0:0:0:0:0:0:0:1%lo,
10.1.1.231, 10.1.1.240, 127.0.0.1], sockAddrs=[/10.1.1.231:47500,
/0:0:0:0:0:0:0:1%lo:47500, /10.1.1.240:47500, /127.0.0.1:47500],
discPort=47500, order=8, intOrder=5, lastExchangeTime=1487364179049,
loc=true, ver=1.8.0#19700101-sha1:00000000, isClient=false]

                

I receive Timeout was reached before computation completed.

I hope that you can give me some helps please...
Regards
Devis





Re: Timeout was reached before computation completed

Posted by devis76 <de...@flexvalley.com>.
Hi Val,
thank you very much now works with your suggestions
Devis



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Timeout-was-reached-before-computation-completed-tp10712p11046.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Timeout was reached before computation completed

Posted by vkulichenko <va...@gmail.com>.
Devis,

I think this happens because of thread starvation. Both compute job and
service proxy invocations are processed in the same thread pool, so if you
synchronously call a service from a job, you can run out of threads and get
stuck. Can you replace the service with another callable? In this case you
can execute asynchronously and use continuations [1] to avoid starvation.

[1]
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/computegrid/ComputeFibonacciContinuationExample.java

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Timeout-was-reached-before-computation-completed-tp10712p10844.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.