Confluence hanging intermittently, and not sure why?
Asked by Alexander Perrin:

Hello

We are having problems with our Confluence test instance, at v 6.1.2, which we upgraded from v 5.4.4.

Whenever I restart confluence and login it hangs for around 10 minutes, and then completes the login. Then occassionaly, perhaps every few hours, this will happen again when I will click onto a particular page, or try a particular action.

In the atlassian-confluence.log file during the hang nothing is output. Then when Confluence starts working again this is output:

2017-08-02 14:07:51,468 WARN \[http-nio-8443-exec-20\] \[confluence.util.profiling.DefaultActivityMonitor\] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1501678703676, threadId=192, threadName='http-nio-8443-exec-20', userId='alex.Perrin', type='web-request', summary='/display/URT/URLTEST+Home?src=spacemenu'}  
-- url: /display/URT/URLTEST+Home \| traceId: be16d35b4795a2f2 \| userName: alex.Perrin \| referer: <https://xxx.xxx.com/display/URT/URLTEST+Home>

I took several thread dumps during this particular hang. That thread seems to be this one below, as taken from the thread dump. There are a couple of locked messages, but other than that I can't really decode what is happening, and whether this thread really is the culprit. I've attached all the logs from this particular episode, any help would be appreciated!

"http-nio-8443-exec-20" #192 daemon prio=5 os_prio=0 tid=0x00007f7824ccf800 nid=0x2146 runnable \[0x00007f775f8e1000\]  
java.lang.Thread.State: RUNNABLE  
at java.net.PlainSocketImpl.socketConnect(Native Method)  
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)  
- locked \<0x00000007a8d41148\> (a java.net.SocksSocketImpl)  
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  
at java.net.Socket.connect(Socket.java:589)  
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:337)  
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)  
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)  
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)  
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)  
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)  
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)  
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)  
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)  
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)  
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)  
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)  
at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher.fetch(HttpClientFetcher.java:87)  
at org.apache.shindig.gadgets.DefaultMessageBundleFactory.fetchBundle(

...

<br />

(CoyoteAdapter.java:502)  
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)  
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)  
- locked \<0x00000007b5e30f90\> (a org.apache.tomcat.util.net.SecureNioChannel)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.lang.Thread.run(Thread.java:748)


Answers:
author: Edwin Kyalangalilwa
body: Did you try running the log analyzer?

Also look into synchrony, since it was introduced in 6.0.

Are there any add-ons that are incompatible?

Try clearing the plugins cache and restarting

<https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html>

comments: author: Pooja Joshi
body: Hi Folks , I am also going through the similar issue, but the clearing the cache is not the appropriate solution. Not able to find out the actual root cause and what can be the workaround for the same, could you please suggest.

Thanks


Tags: thread