ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From userx <gagan...@gmail.com>
Subject ignite.active(true) blocking forever
Date Mon, 21 Aug 2017 18:15:30 GMT
Hi all,

*QUESTION:-Is there a way to timeOut the ignite.active(true) so that the
client does not block forever and moves ahead for some other important
processing ?*

*OBSERVATIONS:-*

I have a client(-Xms512m -Xmx512m) which is represented by the following
piece of code
package org.apache.ignite.examples;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.CacheConfiguration;

public class DataGridClient {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Ignition.setClientMode(true);
		Ignite ignite = Ignition.start("examples/config/example-ignite.xml");
		System.out.println("Before Active");
		ignite.active(true);
		System.out.println("After Active");
		CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<Integer,
Integer>("1");
		IgniteCache<Integer,Integer> cache = ignite.getOrCreateCache(cfg);
		cache.put(1, 1);
	}

}

I have 2 servers (2 different jvms on same machine) *deliberately* started
with -Xms128m -Xmx128m with the following piece of code.
Ignite ignite = Ignition.start("config/example-ignite.xml");

Client and both Servers are started on the same machine.

What I have observed is that the text "After Active" never gets printed and
ignite.active(true) blocks forever. On the other hand, I could see that
there is an OOM error in the server logs
[23:34:47] Ignite node started OK (id=825a2757)
[23:34:47] Topology snapshot [ver=1, servers=1, clients=0, CPUs=4,
heap=0.13GB]
TcpDiscoveryNode [id=825a2757-71b6-4483-90d3-0a0b1d7b1923,
addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.1.3,
fd9c:b2b2:d704:2000:4cbb:b964:b3fb:9269,
fd9c:b2b2:d704:2000:68ac:5531:940e:b851],
sockAddrs=[Garima-PC/192.168.1.3:47501,
/fd9c:b2b2:d704:2000:4cbb:b964:b3fb:9269:47501,
/fd9c:b2b2:d704:2000:68ac:5531:940e:b851:47501, /0:0:0:0:0:0:0:1:47501,
/127.0.0.1:47501], discPort=47501, order=1, intOrder=1,
lastExchangeTime=1503338687228, loc=true, ver=2.1.0#20170720-sha1:a6ca5c8a,
isClient=false]
[23:34:47] Topology snapshot [ver=2, servers=2, clients=0, CPUs=4,
heap=0.25GB]
[23:35:41] Topology snapshot [ver=3, servers=2, clients=1, CPUs=4,
heap=0.75GB]
[23:35:41] Default checkpoint page buffer size is too small, setting to an
adjusted value: 519.5 MiB
[23:35:41,881][ERROR][exchange-worker-#34%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=3,
minorTopVer=1], nodeId=825a2757, evt=DISCOVERY_CUSTOM_EVT]
java.lang.OutOfMemoryError: null
	at sun.misc.Unsafe.allocateMemory(Native Method) ~[?:1.8.0_111]
	at
org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1054)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:80)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.start(PageMemoryImpl.java:276)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.startMemoryPolicies(IgniteCacheDatabaseSharedManager.java:194)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.onActivate(IgniteCacheDatabaseSharedManager.java:949)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.onActivate(GridCacheDatabaseSharedManager.java:459)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheSharedContext.activate(GridCacheSharedContext.java:244)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onClusterStateChangeRequest(GridDhtPartitionsExchangeFuture.java:762)
~[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:574)
[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
[ignite-core-2.1.0.jar:2.1.0]
	at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
[ignite-core-2.1.0.jar:2.1.0]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
[23:35:41,889][ERROR][exchange-worker-#34%null%][GridCachePartitionExchangeManager]
Runtime error caught during grid runnable execution: GridWorker
[name=partition-exchanger, igniteInstanceName=null, finished=false,
hashCode=724661, interrupted=false, runner=exchange-worker-#34%null%]




 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-active-true-blocking-forever-tp16346.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message