TCP* Extend client thread pool

Hi,
Is there a way to configure the number of threads used by TCP* Extend client? What is the default value for the same?
For some reason I am observing TCP connection being reset. Here are the logs:
2010-05-05 04:39:02.572/15821.6> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Closed: TcpConnection(Id=0x0000012866AD9AC4AAF0E60D08143308BF16B5D3C3356683C13C90CC0213FB3C, Open=false, LocalAddress=170.240.228.192:1105, RemoteAddress=170.240.230.13:27001)
2010-05-05 04:39:02.572/15821.5> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Stopped: TcpInitiator{Name=DistributedCacheForHDElements-NY:TcpInitiator, State=(SERVICE_STOPPED), ThreadCount=0, Codec=Codec(Format=POF), PingInterval=0, PingTimeout=10000, RequestTimeout=10000, ConnectTimeout=10000, RemoteAddresses=[/170.240.230.13:27001,/141.128.62.137:27007,/141.128.62.138:27005,/170.240.230.13:27002,/141.128.62.138:27006,/141.128.62.137:27008,/170.240.230.13:27003,/141.128.62.138:27004], KeepAliveEnabled=true, TcpDelayEnabled=false, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
2010-05-05 04:39:02.588/15821.5> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Started: TcpInitiator{Name=DistributedCacheForHDElements-NY:TcpInitiator, State=(SERVICE_STARTED), ThreadCount=0, Codec=Codec(Format=POF), PingInterval=0, PingTimeout=10000, RequestTimeout=10000, ConnectTimeout=10000, RemoteAddresses=[/141.128.62.138:27006,/141.128.62.138:27005,/170.240.230.13:27003,/141.128.62.138:27004,/170.240.230.13:27002,/141.128.62.137:27007,/141.128.62.137:27008,/170.240.230.13:27001], KeepAliveEnabled=true, TcpDelayEnabled=false, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
2010-05-05 04:39:02.588/15821.5> (thread=[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Opening Socket connection to 141.128.62.138:27006
2010-05-05 04:39:02.588/15821.nfo> (thread=[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Connected to 141.128.62.138:27006
2010-05-05 04:39:02.604/15821.6> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Opened: TcpConnection(Id=0x00000128679E39D68D803E8A52F48499974C7DC9B4BF127ECF23CF2771B8CB90, Open=true, LocalAddress=170.240.228.192:4742, RemoteAddress=141.128.62.138:27006)
2010-05-05 04:39:02.604/15821.6> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Opened: Channel(Id=1628408480, Open=true, Connection=0x00000128679E39D68D803E8A52F48499974C7DC9B4BF127ECF23CF2771B8CB90)
2010-05-05 04:39:02.619/15821.6> (thread=DistributedCacheForHDElements-NY:TcpInitiator, member=n/a): Opened: Channel(Id=734361514, Open=true, Connection=0x00000128679E39D68D803E8A52F48499974C7DC9B4BF127ECF23CF2771B8CB90)
Regards,
Kishore
Edited by: user10737736 on May 6, 2010 5:06 AM

Hi Kishore,
In the proxy-scheme of your cache configuration, you can use thread-count to configure the number of threads used by TCP* Extend client. The default value is 0. e.g.
<proxy-scheme>
<service-name>ExtendTcpProxyService</service-name>
<thread-count>50</thread-count>
</proxy-scheme>
-Luk

Similar Messages

  • OutOfMemoryError in cluster after  TCP-extend client suspends processing.

    Anybody able to explain why the following exception might occur... seems to occur when a client connected through tcp-extend is suspended during continuous query processing.
    2007-12-20 21:19:49.009 Oracle Coherence GE 3.3.1/389 <Error> (thread=DistributedCache, member=1): Error sending MapEvent to Channel(Id=374515075, Connection=0x00000116F96C67F4A97BDC3A739C40D11DA1C36E3C50F9FBC8BB5AD8DCF4E16E, Open=true): java.lang.OutOfMemoryError: Direct buffer memory
    at java.nio.Bits.reserveMemory(Bits.java:633)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
    at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.instantiateResource(TcpAcceptor.CDB:7)

    Hi,
    We are also getting same excpetion. "java.lang.OutOfMemoryError: Direct buffer memory". I have changed the -XX:MaxDirectMemorySize=256m still getting the same Exception. Tried to investigate by getting the log level to 7 still could not figure out the exact issue. We are running on 3.3.1/389p4 version of Coherence. Only thing I noticed was at times there are many connections in netstat -a o/p in CLOSE_WAIT position.
    Please Help!
    Regards,
    -Amit
    This Exception we are getting on TCP Extend Proxy nodes.
    2008-06-30 12:54:41.478 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266526720 bytes total
    2008-06-30 12:54:41.478 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266536960 bytes total
    2008-06-30 12:54:41.478 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266547200 bytes total
    2008-06-30 12:54:41.478 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266557440 bytes total
    2008-06-30 12:54:41.479 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266567680 bytes total
    2008-06-30 12:54:41.479 Oracle Coherence GE 3.3.1/389p4 <D6> (thread=DistributedCache, member=26): Outgoing ByteBufferPool increased to 266577920 bytes total
    2008-06-30 12:54:41.789 Oracle Coherence GE 3.3.1/389p4 <Error> (thread=DistributedCache, member=26): Error sending MapEvent to Channel(Id=1140491821, Connection=0x0000011AD950F44BAC1A65A1FB03F9B2AFAE8B5F9FF39688C81572023DF9F53B, Open=true): java.lang.OutOfMemoryError: Direct buffer memory
    at java.nio.Bits.reserveMemory(Bits.java:632)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
    at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.instantiateResource(TcpAcceptor.CDB:7)
    at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.acquire(TcpAcceptor.CDB:26)
    at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.allocate(TcpAcceptor.CDB:4)
    at com.tangosol.io.MultiBufferWriteBuffer.advance(MultiBufferWriteBuffer.java:870)
    at com.tangosol.io.MultiBufferWriteBuffer.<init>(MultiBufferWriteBuffer.java:32)
    at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$TcpConnection.allocateWriteBuffer(TcpAcceptor.CDB:3)
    at com.tangosol.coherence.component.comm.Connection.send(Connection.CDB:16)
    at com.tangosol.coherence.component.comm.Channel.doSend(Channel.CDB:4)
    at com.tangosol.coherence.component.comm.Channel.send(Channel.CDB:38)
    at com.tangosol.coherence.component.net.extend.proxy.MapListenerProxy.onMapEvent(MapListenerProxy.CDB:9)
    at com.tangosol.coherence.component.net.extend.proxy.MapListenerProxy.entryInserted(MapListenerProxy.CDB:1)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.entryInserted(DistributedCache.CDB:1)
    at com.tangosol.util.MapListenerSupport$WrapperSynchronousListener.entryInserted(MapListenerSupport.java:856)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
    at com.tangosol.coherence.component.util.CacheEvent.dispatchSafe(CacheEvent.CDB:14)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$BinaryMap.dispatch(DistributedCache.CDB:86)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onMapEvent(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$MapEvent.onReceived(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onMessage(Service.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onNotify(Service.CDB:130)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
    at java.lang.Thread.run(Thread.java:595)

  • Set user defined UUID for coherence extend clients

    I notice in Coherence 3.5.2 there are improved jmx stats for tcp extend clients.
    Right now I see a client is identified in jmx with a cryptic UUID. Is it possible for the tcp extend client to set its own UUID or alike, so one can more easily identify a client.

    Currently, Coherence does not support connection naming.

  • Initial Deserialization on TCP*Extend Server

    Hi Guys,
    I have observed something on a TCP*Extend server which I can't quite explain. We've got some hairy custom serialization inside an Externalizable bean. I was under the impression that classes aren't deserialized inside the cluster unless they need to be e.g. to processed by entry processors or value extractors on indexes. However, when I put one of these objects from a TCP*Extend client into the cluster on the tcp*extend server I see some slightly odd behaviour on the server where the deserialization method is called on an empty object and the object I've just send from the client is then serialized.
    Can I therefore assume there is an extra deserialization/reserialization loop on a tcp*extend server on data obtained from the client?
    Kind Regards,
    Max

    Hi Max,
    Yes, currently the ProxyService must deserialize/serialize data sent from/to clients as part of a POF translation step in order to support non-Java clients. We will be extending POF serialization support "into" the cluster in the next Coherence release. Once this is in place, this extra deserialization/serialization step will not be necessary and will be removed from the ProxyService.
    Regards,
    Jason

  • Lock Client-Side TCP-Extends

    Hi,
    I am running 2 processes on the same server both connecting to one cluster node.
    I need to ensure only one process performs a write operation @ a certain time (i.e. the first one to attain the lock).
    I am finding that both the processes are getting the lock, and cannot work-out why...
    We are using tcp-extends, and I am using the following related cluster configuration:
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>cache.cluster.*</cache-name>
    <scheme-name>scheme.cluster.system</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <proxy-scheme>
    <scheme-name>scheme.cluster.proxy</scheme-name>
    <service-name>service.cluster.proxy</service-name>
    <thread-count>4</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address system-property="datacloud.node.tcp-extend.bind-address">localhost</address>
    <port system-property="datacloud.node.tcp-extend.port">11200</port>
    </local-address>
    <keep-alive-enabled>true</keep-alive-enabled>
    </tcp-acceptor>
    </acceptor-config>
    <proxy-config>
    <cache-service-proxy>
    <lock-enabled>true</lock-enabled>
    <!--read-only>true</read-only -->
    </cache-service-proxy>
    </proxy-config>
    <autostart>true</autostart>
    </proxy-scheme>
    <replicated-scheme>
    <scheme-name>scheme.cluster.system</scheme-name>
    <service-name>ReplicatedCache</service-name>
    <lease-granularity>member</lease-granularity>
    <member-listener>
    <class-name>datacloud.cluster.listeners.ClusterMemberListener</class-name>
    </member-listener>
    <backing-map-scheme>
    <local-scheme />
    </backing-map-scheme>
    <autostart>true</autostart>
    </replicated-scheme>
    </caching-schemes>
    The client copies this scheme by using the following:
              <cache-mapping>
                   <cache-name>cache.cluster.lock</cache-name>
                   <scheme-name>scheme.remote</scheme-name>
              </cache-mapping>
    The lock essentially does:
    NamedCache cache = CacheFactory.getCache("cache.cluster.lock")
    boolean isLockAcquired = cache.lock("KEY", 5000)
    try {
    if(isLockAcquired) {
    (takes 2 seconds to complete)
    } finally {
    cache.unlock("KEY")
    Why can 2 processes acquire the same lock when asked to acquire it @ the same time?
    Edited by: 907011 on 10-Jan-2012 03:33

    Hi,
    This is my explination of why you are seeing the behaviour you are - I think it is correct but I am sure someone will jump in if not.
    1. Your cache config has <lease-granularity>member</lease-granularity> which means that a lock taken out by any thread on a member can be released by the same member. It also means that a Member owns the lock so if I do cache.lock() for a key from some code running on a Member and then do cache.lock() again for the same key on the same Member they will both succeed as the Member owns the lock.
    2. Now, when your first process calls <tt>boolean isLockAcquired = cache.lock("KEY", 5000)</tt> it gets the lock but it is not your client process that owns the lock, it is the Extend Proxy your client is connected to that owns it.
    3. Consequently when process two, connected to the same Extend proxy, asks for the lock, it gets it too, as it is not your client process that owns the lock, it is the Extend Proxy your client is connected to that owns it.
    4. Worse, when process one finishes and releases the lock, then it is released, even though your code in process two still thinks it is running inside the lock.
    As I said, that is my understanding of it and why locks do not really work from Extend Clients. In fact there are very few occasions where I would bother to use explicit locks in Coherence (hence my unfamiliarity about the exact workings) as there are usually other, more reliable, ways to achieve the same requirements.
    JK

  • Thread pool rejecting threads when I don't think it should, ideas?

    Hi,
    I have a server application in which I only want a specific number of simultaneous requests. If the server gets more then this number it is suppose to close the connection (sends an HTTP 503 error to the client). To do this I used a fix thread pool. When I start the server and submit the max number of requests I get the expected behavior. However if I resubmit the request (within a small period of time, e.g. 1-15 seconds after the first one) I get very odd behavior in that some of the requests are rejected. For example if I set the max to 100 the first set of requests will work fine (100 requests, 100 responses). I then submit again and a small number will be rejected (I've seen it range from 1 to 15 rejected)....
    I made a small app which kind of duplicates this behavior (see below). Basically when I see is that the first time submitting requests works fine but the second time I get a rejected one. As best as I can tell none should be rejected....
    Here is the code, I welcome your thoughts or if you see something I am doing wrong here...
    <pre>
    import java.util.concurrent.*;
    import java.util.concurrent.atomic.AtomicInteger;
    public class ThreadPoolTest {
         static AtomicInteger count = new AtomicInteger();
         public static class threaded implements Runnable {
              @Override
              public void run() {
                   System.out.println("In thread: " + Thread.currentThread().getId());
                   try {
                        Thread.sleep(500);
                   } catch (InterruptedException e) {
                        System.out.println("Thread: " + Thread.currentThread().getId()
                                  + " interuptted");
                   System.out.println("Exiting run: " + Thread.currentThread().getId());
         private static int maxThreads = 3;
         private ThreadPoolExecutor pool;
         public ThreadPoolTest() {
              super();
              pool = new java.util.concurrent.ThreadPoolExecutor(
                        1, maxThreads - 1, 60L, TimeUnit.SECONDS,
                        new ArrayBlockingQueue<Runnable>(1));
         public static void main(String[] args) throws InterruptedException {
              ThreadPoolTest object = new ThreadPoolTest();
              object.doThreads();
              Thread.sleep(3000);
              object.doThreads();
              object.pool.shutdown();
              try {
                   object.pool.awaitTermination(60, TimeUnit.SECONDS);
              } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         private void doThreads() {
              int submitted = 0, rejected = 0;
              int counter = count.getAndIncrement();
              for (int x = 0; x < maxThreads ; x++) {
                   try {
                        System.out.println("Run #: " + counter + " submitting " + x);
                        pool.execute(new threaded());
                        submitted++;
                   catch (RejectedExecutionException re) {
                        System.err.println("\tRun #: " + counter + ", submission " + x
                                  + " was rejected");
                        System.err.println("\tQueue active: " + pool.getActiveCount());
                        System.err.println("\tQueue size: " + pool.getPoolSize());
                        rejected++;
              System.out.println("\n\n\tRun #: " + counter);
              System.out.println("\tSubmitted: " + (submitted + rejected));
              System.out.println("\tAccepted: " + submitted);
              System.out.println("\tRejected: " + rejected + "\n\n");
    </pre>

    First thank you for taking the time to reply, I do appreciate it.
    jtahlborn - The code provided here is a contrived example trying to emulate the bigger app as best as I could. The actual program doesn't have any sleeps, the sleep in the secondary thread is to simulate the program doing some work & replying to a request. The sleep in the primary thread is to simulate a small delay between 'requests' to the pool. I can make this 1 second and up to (at least) 5 seconds with the same results. Additionally I can take out the sleep in the secondary thread and still see the a rejection.
    EJP - Yes I am aware of the TCP/IP queue, however; I don't see that as relevant to my question. The idea is not to prevent the connection but to respond to the client saying we can't process the request (send an "HTTP 503" error). So basically if we have, say, 100 threads running then the 101st, connection will get a 503 error and the connection will be closed.
    Also my test platform - Windows 7 64bit running Java 1.6.0_24-b07 (32bit) on an Intel core i7.
    It occurred to me that I did not show the output of the test program. As the output shows below, the first set of requests are all processed properly. The second set of requests is not. The pool should have 2 threads and 1 slot in the queue, so by the time the second "request" is made at least 2 of the requests from the first call should be done processing, so I could possibly understand run 1, submit #2 failing but not submit 1.
    <pre>
    Run #: 0 submitting 0
    Run #: 0 submitting 1
    Run #: 0 submitting 2
    In thread: 8
    In thread: 9
    Exiting run: 8
    Exiting run: 9
         Run #: 0
         Submitted: 3
         Accepted: 3
         Rejected: 0
    In thread: 8
    Exiting run: 8
    Run #: 1 submitting 0
    In thread: 9
    Run #: 1 submitting 1
         Run #: 1, submission 1 was rejected
         Queue active: 1
         Queue size: 2
    Run #: 1 submitting 2
         Run #: 1
         Submitted: 3
         Accepted: 2
         Rejected: 1
    In thread: 8
    Exiting run: 9
    Exiting run: 8
    </pre>

  • TCP Extend Server - Failed to start Service - Oracle Coherence GE 3.5.2/463

    Hello,
    We are about to go to production I see Failed to start Service in TCP Extend Server (Storage disable node).
    Regards
    /AG
    My Configuration look like the following
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributedCache</scheme-name>
    <service-name>distributedCache</service-name>
    <backing-map-scheme>
    <local-scheme>
    <eviction-policy>HYBRID</eviction-policy>
    <high-units>500</high-units>
    <low-units>375</low-units>
    <unit-calculator>BINARY</unit-calculator>
    <unit-factor>1048576</unit-factor>
    </local-scheme>
    </backing-map-scheme>
    </distributed-scheme>
    <proxy-scheme>
    <service-name>ExtendTcpProxyService</service-name>
    <thread-count>15</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address system-property="proxy.listen.address">....</address>
    <port system-property="proxy.listen.port">....</port>
    </local-address>
    </tcp-acceptor>
    </acceptor-config>
    <autostart>true</autostart>
    </proxy-scheme>
    </caching-schemes>
    </cache-config>
    ------------------------------------------------------------------------- And the Log looks like the following ------------------------------------
    2009-12-04 16:21:54.056/25821.278 Oracle Coherence GE 3.5.2/463 <D6> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, member=12): Closed: Channel(Id=193159068
    6, Open=false)
    2009-12-04 16:21:54.058/25821.280 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:4, member=12): Repeating SizeReques
    t due to the re-distribution of PartitionSet{220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242
    , 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256}
    2009-12-04 16:21:54.058/25821.280 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:12, member=12): Repeating SizeReque
    st due to the re-distribution of PartitionSet{220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 24
    2, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256}
    2009-12-04 16:21:54.058/25821.280 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:11, member=12): Repeating SizeReque
    st due to the re-distribution of PartitionSet{220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 24
    2, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256}
    2009-12-04 16:21:54.058/25821.280 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:7, member=12): Repeating SizeReques
    t due to the re-distribution of PartitionSet{220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242
    , 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256}
    2009-12-04 16:21:54.175/25821.397 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:10, member=12): An exception occurr
    ed while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:15)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendPartitionedRequest(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(DistributedCache.CDB:13)
    at com.tangosol.util.ConverterCollections$ConverterMap.size(ConverterCollections.java:1470)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.size(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.size(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.collections.WrapperMap.size(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$SizeRequest.onRun(NamedCacheFactory.CDB:7)
    at com.tangosol.coherence.component.net.extend.message.Request.run(Request.CDB:4)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.onMessage(NamedCacheProxy.CDB:11)
    at com.tangosol.coherence.component.net.extend.Channel.execute(Channel.CDB:28)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:26)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:96)
    ... 18 more
    2009-12-04 16:21:54.175/25821.397 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:9, member=12): An exception occurre
    d while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:15)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendPartitionedRequest(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(DistributedCache.CDB:13)
    at com.tangosol.util.ConverterCollections$ConverterMap.size(ConverterCollections.java:1470)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.size(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.size(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.collections.WrapperMap.size(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$SizeRequest.onRun(NamedCacheFactory.CDB:7)
    at com.tangosol.coherence.component.net.extend.message.Request.run(Request.CDB:4)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.onMessage(NamedCacheProxy.CDB:11)
    at com.tangosol.coherence.component.net.extend.Channel.execute(Channel.CDB:28)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:26)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:96)
    ... 18 more
    2009-12-04 16:21:54.175/25821.397 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:13, member=12): An exception occurr
    ed while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:15)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendPartitionedRequest(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(DistributedCache.CDB:13)
    at com.tangosol.util.ConverterCollections$ConverterMap.size(ConverterCollections.java:1470)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.size(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.size(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.collections.WrapperMap.size(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$SizeRequest.onRun(NamedCacheFactory.CDB:7)
    at com.tangosol.coherence.component.net.extend.message.Request.run(Request.CDB:4)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.onMessage(NamedCacheProxy.CDB:11)
    at com.tangosol.coherence.component.net.extend.Channel.execute(Channel.CDB:28)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:26)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:96)
    ... 18 more
    2009-12-04 16:21:54.175/25821.397 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:11, member=12): An exception occurr
    ed while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:15)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendPartitionedRequest(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(DistributedCache.CDB:13)
    at com.tangosol.util.ConverterCollections$ConverterMap.size(ConverterCollections.java:1470)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.size(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.size(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.collections.WrapperMap.size(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$SizeRequest.onRun(NamedCacheFactory.CDB:7)
    at com.tangosol.coherence.component.net.extend.message.Request.run(Request.CDB:4)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.onMessage(NamedCacheProxy.CDB:11)
    at com.tangosol.coherence.component.net.extend.Channel.execute(Channel.CDB:28)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:26)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:96)
    ... 18 more
    2009-12-04 16:21:54.175/25821.397 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:2, member=12): An exception occurre
    d while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:15)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendPartitionedRequest(DistributedCache.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(DistributedCache.CDB:13)
    at com.tangosol.util.ConverterCollections$ConverterMap.size(ConverterCollections.java:1470)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.size(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.size(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.collections.WrapperMap.size(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$SizeRequest.onRun(NamedCacheFactory.CDB:7)
    at com.tangosol.coherence.component.net.extend.message.Request.run(Request.CDB:4)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.onMessage(NamedCacheProxy.CDB:11)
    at com.tangosol.coherence.component.net.extend.Channel.execute(Channel.CDB:28)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:26)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:96)
    ... 18 more
    2009-12-04 16:21:54.176/25821.398 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:6, member=12): An exception occurre
    d while processing a SizeRequest for Service=Proxy:ExtendTcpProxyService:TcpAcceptor: (Wrapped) java.lang.InterruptedException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForPartitionRedistribution(DistributedCache
    .CDB:107)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.waitForRedistribution(DistributedCache.CDB:34)
    :$
    2009-12-04 16:21:54.259/25821.481 Oracle Coherence GE 3.5.2/463 <D4> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:8, member=12): Daemon caught an unh
    andled exception (com.tangosol.net.messaging.ConnectionException: channel is closed) while exiting.
    2009-12-04 16:21:54.264/25821.486 Oracle Coherence GE 3.5.2/463 <D4> (thread=Proxy:ExtendTcpProxyService:TcpAcceptorWorker:3, member=12): Daemon caught an unh
    andled exception (com.tangosol.net.messaging.ConnectionException: channel is closed) while exiting.
    2009-12-04 16:21:54.330/25821.552 Oracle Coherence GE 3.5.2/463 <D5> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, member=12): Stopped: TcpAcceptor{Name=Pr
    oxy:ExtendTcpProxyService:TcpAcceptor, State=(SERVICE_STOPPED), ThreadCount=0, Codec=Codec(Format=POF), PingInterval=0, PingTimeout=0, RequestTimeout=0, Local
    Address=[nybc94lxb01/10.12.101.81:21005], LocalAddressReusable=false, KeepAliveEnabled=true, TcpDelayEnabled=false, ReceiveBufferSize=0, SendBufferSize=0, Lis
    tenBacklog=0, LingerTimeout=-1, BufferPoolIn=BufferPool(BufferSize=2KB, BufferType=DIRECT, Capacity=Unlimited), BufferPoolOut=BufferPool(BufferSize=2KB, Buffe
    rType=DIRECT, Capacity=Unlimited)}
    Exception in thread "Thread-2" java.lang.RuntimeException: Failed to start Service "Proxy:ExtendTcpProxyService:TcpAcceptor" (ServiceState=SERVICE_STOPPED)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.waitAcceptingClients(Service.CDB:12)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:10)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.closeChannel(Peer.CDB:18)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.closeChannel(Peer.CDB:1)
    at com.tangosol.coherence.component.net.extend.Channel.close(Channel.CDB:20)
    at com.tangosol.coherence.component.net.extend.Channel.close(Channel.CDB:1)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.run(NamedCacheProxy.CDB:30)
    at java.lang.Thread.run(Thread.java:619)
    Exception in thread "Thread-3" java.lang.RuntimeException: Failed to start Service "Proxy:ExtendTcpProxyService:TcpAcceptor" (ServiceState=SERVICE_STOPPED)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.waitAcceptingClients(Service.CDB:12)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:10)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.closeChannel(Peer.CDB:18)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.closeChannel(Peer.CDB:1)
    at com.tangosol.coherence.component.net.extend.Channel.close(Channel.CDB:20)
    at com.tangosol.coherence.component.net.extend.Channel.close(Channel.CDB:1)
    at com.tangosol.coherence.component.net.extend.proxy.NamedCacheProxy.run(NamedCacheProxy.CDB:30)
    at java.lang.Thread.run(Thread.java:619)
    Edited by: Anand Gupta on Dec 4, 2009 5:10 PM

    David,
    Thanks for your detailed response. I will try all that you suggested and let you know my observation at the end. To give a back ground of the application I am working on.
    Background
    Try to replace home grown cache (very well optimized uses custom serialization using NIO bytebuffer etc.,) my mandate is to replace the legacy cache with coherence (I love coherence product (at least 3.4) from my previous job experience). Since all kind of optimization is done in legacy application I am converting NIO byteBuffer generated by legacy serialization to byteArray and converting ByteArray into POF. Also for various other reasons, I have to send entry processor to do even get and put data from the cluster.
    Raw Data Set Size
    My data size is just 500MB (In Production). I put enough cache nodes so that raw data is just 50MB per node. (Since it is compute heavy with entry processor and the number of clients are going to be ~2500)
    What was happening when I got the exception?
    I was doing stress testing of the cache. Not sure if that put lot of garbage in some of the node hence may be the garbage collection pause triggered the re-distribution of partition set. Since the stress testing was on the way it might had cascading effect on all the nodes.
    Datagram Test result.
    Tx summary 4 peers:
    life: 96 MB/sec, 68774 packets/sec
    now: 100 MB/sec, 71378 packets/sec, packets/burst: 1029, bursts/second: 69.41594
    Success rate ranges from 0.87 to 1.0
    Is a success rate less than 0.98 a cause for concern?
    Regarding Size (to keep the extend client always connected to the proxy)
    I do size request every 5 sec. if there is not other request has gone to the cluster in the past 5 sec.
    In one of the oracle presentation it was said that "If you have map listener's and no other request from a long period of time extend client has to do a periodic size request to make sure that connection to proxy is alive"
    In this regard my question is "Can the same effect achieved by doing member listener on the extend client and on disconnection do the size request?"
    Proxy Size guide lines
    In production number of extend clients are going to be ~2500 connected all the time.
    Of which 2000 clients with few map listener + entry processor gets (Each of the clients will have distinct and disjoint set of data on which they work and listener)
    And the remaining ~500 clients will do all kinds of request on the entire data set.
    In this circumstance is there any recommendation for Number of extend-client : Number of extend-server : Number of threads ratio?
    Regards
    /Anand

  • TCP EXTEND Server SIde configuration

    one of the configuration which is required for server proxy scheme is address ofteh server
    I can't specify localhost as server and tcp client is going to run on two differenet servers
    I have to run this tcp extend server for 3-4 server for failover support
    How can I specify address ( IP ADDRESS HERE) which can changed for each server configuration without specifying this config for each server differenetly
    can I replace this address besed on property or system parameter or spring injection.
    <proxy-scheme>
    <service-name>ExtendTcpProxyService</service-name>
    <thread-count>5</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    *<address>IP ADDRESS OF SERVER HERE</address>*
    <port>9099</port>
    </local-address>
    </tcp-acceptor>
    </acceptor-config>
    <autostart>true</autostart>
    </proxy-scheme>
    </caching-schemes>

    Why can't you use localhost? Surely this is what you want unless you are running on a machine with multiple network cards and need to bind to a particular address.
    If you really want to be able to specify a different address for each machine you can do this
    <proxy-scheme>
      <service-name>ExtendTcpProxyService</service-name>
      <thread-count>5</thread-count>
      <acceptor-config>
        <tcp-acceptor>
            <local-address>
                <address system-property="extend.address"></address>
                <port>9099</port>
            </local-address>
          </tcp-acceptor>
        </acceptor-config>
      <autostart>true</autostart>
    </proxy-scheme>Coherence will now use the value of the extend.address system property as the value for your address. This can be passed in on the command line like this:
    java -cp coherence.jar -Dextend.address=IP_ADDRESS_HERE com.tangosol.net.DefaultCacheServerObviously your command to start the cache servers would probably have more in it than that.
    JK

  • TCP Extend (DefaultCacheServer rejects connections)

    Hi guys
    Have been trying to setup TCP Extend to make a Linux box use cache configured on a windows box and the DefaultCacheServer rejects TCP connections. The config files I'm using are attached. Can anyone help ?
    The DefaultCacheServer comes up nicely
    SafeCluster: Name=n/a
    Group{Address=224.3.2.0, Port=32367, TTL=1}
    MasterMemberSet
    ThisMember=Member(Id=1, Timestamp=2007-03-29 16:07:16.026, Address=147.114.162.160:54321, MachineId=17312)
    OldestMember=Member(Id=1, Timestamp=2007-03-29 16:07:16.026, Address=147.114.162.160:54321, MachineId=17312)
    ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2007-03-29 16:07:16.026, Address=147.114.162.160:54321, MachineId=17312)
    RecycleMillis=120000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
    TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=147.114.162.160:54321}, Connections=[]}
    ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.2, OldestMemberId=1}
    DistributedCache{Name=DistributedCache, State=(SERVICE_STARTED), Id=1, Version=3.2, OldestMemberId=1, LocalStorage=enabled, PartitionCount=257, Bac
    upCount=1, AssignedPartitions=257, BackupPartitions=0}
    but when I run the client, I get this
    2007-03-29 16:09:42.698 Tangosol Coherence DGE 3.2/367 <D4> (thread=TcpRingListener, member=1): Rejecting connection to member 649 using TcpSocket{Sta
    te=STATE_OPEN, Socket=Socket[addr=/172.26.102.115,port=36952,localport=54321]}<br><br> <b> Attachment: </b><br>cluster-side-config.xml <br> (*To use this attachment you will need to rename 516.bin to cluster-side-config.xml after the download is complete.)<br><br> <b> Attachment: </b><br>client-side-config.xml <br> (*To use this attachment you will need to rename 517.bin to client-side-config.xml after the download is complete.)

    Hi pandeyv,
    You need to configure an instance of the ProxyService in your cluster-side cache configuration file. Coherence*Extend clients connect to the ProxyService over TCP/IP and not the TcpRingService. The TcpRingService is only used by cluster members for death detection.
    See the following for instructions on configuring the cluster and client-side configuration files:
    http://wiki.tangosol.com/display/COH32UG/Configuring+and+Using+Coherence*Extend
    Additionally, I noticed that you are using an old release of Coherence 3.2. Please upgrade to the latest 3.2 service pack (3.2.2):
    http://www.tangosol.com/product-downloads.jsp
    Regards,
    Jason

  • TCP Extend Errors

    Hi All,
    I am getting the below errors in my TCP-Extend Proxy nodes.
    Oracle Coherence GE 3.5.3/465p3 <Error> (thread=Proxy:ExendTcpProxyService:TcpAcceptorWorker:7, member=19): Extend*TCP has determined that the connection to "Socket[addr=/11.11.56.123,port=18733,localport=17062]" must be closed to maintain system stability: This connection is 1 messages behind (112820921 bytes); the limit is 60000 messages (100000000 bytes).
    What does this mean ? Any serious issues in the cluster ?

    Hi user594809 ,
    Coherence will close an Extend connection if it thinks that the client is not reading messages off of its queue fast enough as this can destabilise the extend proxy. The limit is 60000 messages behind or 100Mbytes behind.
    In your case you have tried to return too much data in a single go (112,820,921 bytes) - I have seen this is often the result of an invocation service call or something similar. What tends to happen in this case is that your client has started to read the message back and while doing this Coherence closes the connection so you get stream exceptions in the client.
    If you really need to return such a large amount of data there are a couple of settings you can add to your <tcp-acceptor> configuration on the client
    For example:
    <tcp-acceptor>
        <local-address>
            <address>localhost</address>
            <port>10000</port>
        </local-address>
        <limit-buffer-size>100000000</limit-buffer-size>
        <suspect-buffer-size>10000000</suspect-buffer-size>
    </tcp-acceptor>The limit-buffer-size is the maximum size of the queue in bytes before the connection gets closed - The default is 100Mbytes
    The suspect-buffer-size is the size of the queue that Coherence starts to log warnings - The default is 10Mbytes
    If you increase the limit-buffer-size you should increase the suspect-buffer-size too.
    Note there is a reason that these settings are there in the first place and changing them to allow very large results to be returned could have an adverse affect on your extend proxy node and your cluster so it is up to you to test things properly under load.
    JK

  • A good design for a single thread pool manager using java.util.concurrent

    Hi,
    I am developing a client side project which in distinct subparts will execute some tasks in parallel.
    So, just to be logorroic, something like that:
    program\
                \--flow A\
                           \task A1
                           \task A2
                \--flow B\
                            \task B1
                            \task B2
                            \...I would like both flow A and flow B (and all their launched sub tasks) to be executed by the same thread pool, because I want to set a fixed amount of threads that my program can globally run.
    My idea would be something like:
    public class ThreadPoolManager {
        private static ExecutorService executor;
        private static final Object classLock = ThreadPoolManager.class;
         * Returns the single instance of the ExecutorService by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getExecutorService() {
            synchronized (classLock) {
                if (executor != null) {
                    return executor;
                } else {
                    // TODO: put the dimension of the FixedThreadPool in a property
                    executor = Executors.newFixedThreadPool(50);
                return executor;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
    }The tasks I have to execute will be of type Callable, since I expect some results, so you see an ExecutorService interface above.
    The flaws with this design is that I don't prevent the use (for example) of executor.shutdownNow(), which would cause problems.
    The alternative solution I have in mind would be something like having ThreadPoolManager to be a Singleton which implements ExecutorService, implementing all the methods with Delegation to an ExecutorService object created when the ThreadPoolManager object is instantiated for the first time and returned to client:
    public class ThreadPoolManager implements ExecutorService {
        private static ThreadPoolManager pool;
        private static final Object classLock = ThreadPoolManager.class;
        private ExecutorService executor;
         * Returns the single instance of the ThreadPoolManager by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getThreadPoolManager() {
            synchronized (classLock) {
                if (pool !=null) {
                    return pool;
                } else {
                    // create the real thread pool
                    // TODO: put the dimension of the FixedThreadPool in a property
                    // file
                    pool = new ThreadPoolManager();
                    pool.executor = Executors.newFixedThreadPool(50);
                    // executor = Executors.newCachedThreadPool();
                    return pool;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
        /* ======================================== */
        /* implement ExecutorService interface methods via delegation to executor
         * (forbidden method calls, like shutdownNow() , will be "ignored")
          // .....I hope to have expressed all the things, and hope to receive an answer that clarifies my doubts or gives me an hint for an alternative solution or an already made solution.
    ciao
    Alessio

    Two things. Firstly, it's better to use     private static final Object classLock = new Object();because that saves you worrying about whether any other code synchronises on it. Secondly, if you do decide to go for the delegation route then java.lang.reflect.Proxy may be a good way forward.

  • The problem in the thread pool implemented by myself

    Hello, I need to a thread pool in J2ME CDC 1.0 + FP 1.0, so I implemented a simple one by myself that also meets my own requirement.
    Here is the main idea:
    The thread pool creates a fixed number of threads in advance. When a task comes, it is put in the waiting list. All threads tries to get the tasks from the waiting list. If no task exists, the threads wait until someone wakes them up.
    Here are the requirements from myself:
    1. when a task has finished its work in one execution, it is put in the waiting list for the next run.
    2. the task can control the delay between when the task owner tries to put it in the waiting list and when the task is actually put in the waiting list. I need this function because sometimes I don't want the tasks to run too often and want to save some CPU usage.
    In my program, I creates two thread pools. In one pool, every task don't use the delay, and the thread pool works very well. The other pool has the tasks that use the delay, and sometimes, as I can see from the printed information, there are many tasks in the waiting list but 0 or 1 thread executes tasks. It seems that the waiting threads cannot wake up when new tasks comes.
    I suspect the code in addTask(), but cannot find the reason why it fails. Could anyone please help me find out the bug in my code? I put the code of thread pool below
    Thank you in advance
    Zheng Da
    ThreadPool.java
    package j2me.concurrent;
    import java.util.LinkedList;
    import java.util.Timer;
    import java.util.TimerTask;
    import alvis.general.Util;
    public class ThreadPool {
         private int maxQueueSize;
         private boolean running = true;
         private Thread[] threads;
         private LinkedList tasks = new LinkedList();
         private Timer timer = new Timer(true);
         private AtomicInteger usingThreads = new AtomicInteger(0);
         private synchronized boolean isRunning() {
              return running;
         private synchronized void stopRunning() {
              running = false;
         private synchronized PoolTask getTask() {
              while (tasks.isEmpty() && isRunning()) {
                   try {
                        this.wait();
                   } catch (InterruptedException e) {
                        e.printStackTrace();
              if (tasks.isEmpty())
                   return null;
              // Util.log.info(Thread.currentThread().getName() +
              // " gets a task, left tasks: " + tasks.size());
              return (PoolTask) tasks.removeFirst();
         private synchronized void addTaskNoDelay(PoolTask task) {
              tasks.addLast(task);
              notifyAll();
         private synchronized void addTask(final PoolTask task) {
              long delay = task.delay();
              if (delay == 0) {
                   addTaskNoDelay(task);
              } else {
                   timer.schedule(new TimerTask() {
                        public void run() {
                             addTaskNoDelay(task);
                   }, delay);
         private synchronized int numTasks() {
              return tasks.size();
         private class PoolThread extends Thread {
              public void run() {
                   Util.poolThreads.inc();
                   while (isRunning()) {
                        PoolTask task = getTask();
                        if (task == null) {
                             Util.poolThreads.dec();
                             return;
                        usingThreads.inc();
                        long currentTime = System.currentTimeMillis();
                        task.run();
                        long elapsedTime = System.currentTimeMillis() - currentTime;
                        if (elapsedTime > 100)
                             System.err.println(task.toString() + " takes " + ((double) elapsedTime)/1000 + "s");
                        usingThreads.dec();
                        if (!task.finish()) {
                             addTask(task);
                   Util.poolThreads.dec();
         public ThreadPool(int size, int taskQueueSize) {
              maxQueueSize = taskQueueSize;
              threads = new Thread[size];
              for (int i = 0; i < threads.length; i++) {
                   threads[i] = new PoolThread();
                   threads.start();
         public synchronized boolean executor(PoolTask task) {
              if (!isRunning()) {
                   return false;
              Util.log.info("Thread Pool gets " + task + ", there are "
                        + numTasks() + " waiting tasks");
              if (numTasks() >= maxQueueSize) {
                   return false;
              addTask(task);
              return true;
         public synchronized void destroy() {
              stopRunning();
              timer.cancel();
              // TODO: I am not sure it can wake up all threads and destroy them.
              this.notifyAll();
         public synchronized void printSnapshot() {
              System.err.println("using threads: " + usingThreads + ", remaining tasks: " + tasks.size());
    PoolTask.javapackage j2me.concurrent;
    public interface PoolTask extends Runnable {
         * It shows if the task has already finished.
         * If it isn't, the task will be put in the thread pool for the next execution.
         * @return
         boolean finish();
         * It shows the delay in milliseconds that the task is put in the thread pool.
         * @return
         long delay();

    are receiving/sends tasks packets time consuming operation in your case or not? if it is not you do not need to use thread pools at all. you can create a queue like in your code through the linked list and dispatch this queue periodically with minimum monitor usage. try this.
    import java.util.LinkedList;
    public class PacketDispatcher extends Thread {
        LinkedList list = new LinkedList();
        public PacketDispatcher (String name) {
            super(name);
        public void putTask(Task task) {
            synchronized (list) {
                list
                        .add(task);
                list.notify();
        public void run() {
            while (true/* your condition */) {
                Task task = null;
                synchronized (list) {
                    while (list.isEmpty())
                        try {
                            list.wait();
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                    task = (Task)list
                            .poll();
                if (task == null) {
                    try {
                        Thread
                                .sleep(1);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    continue;
                task
                        .run();
                if (!task.isFinished()) {
                    putTask(task);
                Thread
                        .yield();
        public static void main(String[] args) {
            // just for test
            try {
                Thread.sleep (10000);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            PacketDispatcher dispatcher = new PacketDispatcher("Packet Dispatcher");
            Task task = new Task();
            dispatcher.putTask(task);
            dispatcher.start();
            try {
                Thread.sleep (10000);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            Task task2 = new Task();
            dispatcher.putTask(task2);
    class Task {
        long result = 0;
        public boolean isFinished () {
            if (getResult() >= 10000000) {
                return true;
            return false;
        public void run() {
            for (int i = 0; i < 1000; i++) {
                result += i;
        public long getResult () {
            return result;       
    }

  • Log of execute thread pool status

    hi guys
    We are performing some performance analysis on a application and would
    like to log the status of the execute thread pool periodically to a
    log file.
    The performance tests run for a extended period of time and hence
    console is not proving to be effective in monitoring the behaviour
    over a long period of time.
    What other alternatives exist if I want to do this.
    Thanks for your time
    anand

    thanks guys,
    I found an answer in one of rob wollens old post.
    http://dev2dev.bea.com/resourcelibrary/utilitiestools/index.jsp
    Sorry for posting without doing a little research
    ~anand

  • Thread Pool design

    I have one service that processes messages, now I want it to run it in multi threads so it can execute faster. Now my question is how can I make thread pool- what is best design. Since I dont want to create n number of thereads to process n number of messages, I should create thread pool with predefined number of threads.
    So my main program will do something like this
    1)Check thread pool - if available
    2)If available create tak and execute
    3)If not wait (how to wait???)
    4)Once thread has done it should be available for next processing if requred.
    Thanks in advance.

    I am not using put, I am not directly using array queue, what I understand is like its for its internal use. Here is what I am trying with,
    Thread pool  class
    import java.util.concurrent.BlockingQueue;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    public class MyThreadPool extends ThreadPoolExecutor {
         public MyThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime,
                   TimeUnit unit, BlockingQueue<Runnable> queue) {
              super(corePoolSize, maximumPoolSize, keepAliveTime, unit, queue);
    Thread- Runnable object
    public class MyThread implements Runnable{
         public void run() {
              System.out.println("This is MyThread running...");
              try {
                   Thread.currentThread().sleep(1*5*1000);
                   System.out.println("Complted...");
              } catch (InterruptedException e) {
                   e.printStackTrace();
    Main program
    public class MyClient {
         public static void main(String[] args) {
              ArrayBlockingQueue queue = new ArrayBlockingQueue(5, false);
              MyThreadPool myThreadPool = new MyThreadPool(5, 5, 1, TimeUnit.SECONDS, queue);
              for (int i = 0; i < 6; i++) {
                   MyThread t = new MyThread();
                   if(myThreadPool.getTaskCount() != 1)
                        myThreadPool.submit(t);
    }now see my queue size is 5 and I am submitting 6 jobs to execute. When I run main class, it runs all jobs and program never terminates.
    Output:
    This is MyThread running...
    This is MyThread running...
    This is MyThread running...
    This is MyThread running...
    This is MyThread running...
    Complted...
    This is MyThread running...
    Complted...
    Complted...
    Complted...
    Complted...
    Complted...
    Edited by: Miral on Apr 8, 2009 2:16 PM
    Edited by: Miral on Apr 8, 2009 2:17 PM
    Edited by: Miral on Apr 8, 2009 2:17 PM

  • Thread Pool Problem

    Hi,
    I amhaving problem with a thread pooling my code once allocates a thread to a user then never is able to find that it is idle. the code is some what like this.
    public class foo extends Thread{
    pubblic void setPrimeData(Hashtable data){
    //sets the primary data
    run()
    this.isrunning = true;
    //does something
    this.isrunning= false;
    }

    You cannot restart a Thread. Once it has run, it cannot be reused. If you want to hand new tasks to threads in a pool, device some means by which you can hand a running (started) thread a new Runnable to execute in its run() method.
    Chuck

Maybe you are looking for

  • Embedded videos from Presenter won't play/sync

    I have a couple embedded videos in a PPT that I've published from Presenter to Adobe Connect.  When I get to the slide with the video in the Connect meeting, the section with the video is blank.  However, if I turn off the Sync, I get the play bar an

  • Regarding "select into" query and "no data found" exception

    So i have included the following into my procedure: select div_cd into c_div_cd                from division_tab d, emp_tab y                where d.div_name=y.div_text and y.emp_code=d.emp_code; and also an exception exception when no data found --

  • How do I find setup assistant

    When I installed OS X Lion, I cancelled the setup assistant process, intending to complete it when I had the time. now I can't find it and I think there were things I should have done. How do I find it now? Thanks!

  • IOS 5 Photos - Event Key Photos Wrong

    Since updating to iOS 5, the Photos app on my iPhone 4S is showing all the wrong Key Photos for the Events. Rather than using the Key Photos I defined in iPhoto, it is simply using the first photo in every Event. Has anyone else noticed this? It work

  • Error 2738 when trying to uninstall Quicktime

    Let's start off with this - I'm an idiot when it comes to PC's so keep the replies low level ? Failed to upgrade to iTunes8 so was following the troubleshooting guide, removed itunes fine, didn't restart as per the instructions but Quicktime would no