bigdata4u / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Large number of spy memcached threads - despite using a singleton memcached client #215

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Ubuntu linux 1.6.x JDK.

My thread dump has grown to 88 connections:
"Memcached IO over {MemcachedConnection to /169.254.6.20:11211 
/169.254.6.21:11211}" prio=10 tid=0x00000000410a2800 nid=0x854 runnable 
[0x00007f75f867a000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
        at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210)
        at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
        - locked <0x00000000d5949510> (a sun.nio.ch.Util$2)
        - locked <0x00000000d5949500> (a java.util.Collections$UnmodifiableSet)
        - locked <0x00000000d59491c0> (a sun.nio.ch.EPollSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:188)
        at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1591)

   Locked ownable synchronizers:
        - None

"Memcached IO over {MemcachedConnection to /169.254.6.20:11211 
/169.254.6.21:11211}" prio=10 tid=0x00000000406e9800 nid=0x853 runnable 
[0x00007f75f877b000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
        at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210)
        at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
        - locked <0x00000000d60b3e18> (a sun.nio.ch.Util$2)
        - locked <0x00000000d60b3e08> (a java.util.Collections$UnmodifiableSet)
        - locked <0x00000000d60b3ac8> (a sun.nio.ch.EPollSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:188)
        at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1591)

   Locked ownable synchronizers:
        - None

"Memcached IO over {Memcache

There are 2 memcached servers and 2 clients. (the threads seem to be very 
high). I am using my MemcachedClient as a singleton.

The version of spymemcached client is 2.5.

Original issue reported on code.google.com by pranayah...@gmail.com on 28 Oct 2011 at 4:19

GoogleCodeExporter commented 8 years ago
Are these threads actually active?  I don't know of any, but perhaps there's 
something leaking threads when reestablishing the connection after a disconnect.

88 non-active threads wouldn't really hurt that much.  It'd be a really slow 
memory leak.

Also, 2.5 is quite old by now.  2.7.3 is the latest.

Marking as NeedInfo as it's not clear from the info at hand there is a bug in a 
current release.  A test would be useful.

Original comment by ingen...@gmail.com on 28 Oct 2011 at 4:34