Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4A7AB200CEC for ; Mon, 21 Aug 2017 20:15:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 494A5165731; Mon, 21 Aug 2017 18:15:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8C363165730 for ; Mon, 21 Aug 2017 20:15:33 +0200 (CEST) Received: (qmail 86570 invoked by uid 500); 21 Aug 2017 18:15:32 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 86560 invoked by uid 99); 21 Aug 2017 18:15:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2017 18:15:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1B519C2B24 for ; Mon, 21 Aug 2017 18:15:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.173 X-Spam-Level: ** X-Spam-Status: No, score=2.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mfDVxq3qTYws for ; Mon, 21 Aug 2017 18:15:31 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EE7255F5B5 for ; Mon, 21 Aug 2017 18:15:30 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mwork.nabble.com (Postfix) with ESMTP id AC9445E41624F for ; Mon, 21 Aug 2017 11:15:30 -0700 (MST) Date: Mon, 21 Aug 2017 11:15:30 -0700 (MST) From: userx To: user@ignite.apache.org Message-ID: <1503339330689-16346.post@n6.nabble.com> Subject: ignite.active(true) blocking forever MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Mon, 21 Aug 2017 18:15:34 -0000 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 cfg = new CacheConfiguration("1"); IgniteCache 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.