From 295b853f74ccfb346c5a7d65f5a4d6df6a32d82f Mon Sep 17 00:00:00 2001 From: Florian David Date: Tue, 21 Aug 2018 10:50:51 +0200 Subject: [PATCH] Log every exception thrown from Memcached IO thread Related to BES-16032, this patch helps to gather more information about the issue encountered that kill the Memcached IO thread. Please note that this patch will not kill the Memcached IO thread which will continue to run. Previous known bug reports related to this issue are: https://github.com/couchbase/spymemcached/pull/7 https://github.com/couchbase/spymemcached/pull/17 Change-Id: If1d9887963e96ac6ee4a8ec0dd0c19626e521346 JIRA:WBSC-3570 --- src/main/java/net/spy/memcached/MemcachedConnection.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/spy/memcached/MemcachedConnection.java b/src/main/java/net/spy/memcached/MemcachedConnection.java index 649eb30e3..49f7a98ce 100644 --- a/src/main/java/net/spy/memcached/MemcachedConnection.java +++ b/src/main/java/net/spy/memcached/MemcachedConnection.java @@ -1467,6 +1467,8 @@ public void run() { logRunException(e); } catch (ConcurrentModificationException e) { logRunException(e); + } catch (Exception e) { + getLogger().error("Unexpected exception catch by Memcached IO thread ", e); } } getLogger().info("Shut down memcached client");