Thread may be stuck
Asked by Fran?ois:

Hello,

Since i upgrade confluence to 5.9.12, i got an issue with thread being stuck and leading to a crash of the instance.

01-Aug-2016 10:02:39.041 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8080-exec-11" (id=749) has been active for 62,746 milliseconds (since 8/1/16 10:01 AM) to serve the same request for <http://localhost:8080/rest/mywork/latest/status/notification/count> and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 10 thread(s) in total that are monitored by this Valve and may be stuck.  
java.lang.Throwable

Someone knows something about that?

Thanks,

Fran?ois


Answers:
author: Alan Lupsha
body: Switching to a VM with more allocated RAM fixed this issue for me.

comments: author: ViceIce
body: Fixed that on Jira too


author: SABVARX
body: Same issue using 5.10.2

This seems to be a feature, according to the following issue:

<https://jira.atlassian.com/browse/CONF-40977>

In previous confluence versions we did not know about stuck threats. Now we see them in the logs. But they might not be new.


author: Lachlan Musicman
body: Confluence 6.8.0 I experienced this. I've not tried anything.


author: Steffen Becker
body: I get the same issue in Confluence 6.4.1.

Is there a solution for this issue?

comments: author: gfourmis
body: Hi, i got the same issue but can't find why.

I uninstall, redo installation process and switched to the production version and it's ok


author: Logan Hawkes
body: I get the same error when trying to create a new build plan in Bamboo v5.14.3.1. At the end I get an error message in the GUI: "New access key is required but could not be added to Bitbucket Server."

comments: author: Yogesh Mude
body: Hey Logan,

I am also using bamboo v5.14.3.1 and getting same error like thread may be stuck, have you solved this issue.

If yes please help...


author: Christian Plattner
body: Also happens when installing bamboo 6.8.1.

Could you resolve this?


author: Missi
body: I am having this issue as well, using Confluence 5.9.10 when running a backup.

comments: author: Logan Hawkes
body: Me too. I'm using Confluence DataCenter 6.12.2 on Azure. I can't do a site export or backup.


author: JDave
body: I've noticed this occurring on my confluence instance - it is occurring as I am doing the database backup via sqldump. Once the backup is completed, no further errors are seen. I am using Mysql for the database, and on Confluence 6.13


author: Alan Lupsha
body: .

comments: author: Raphael Afaedor
body: Same here, during database set up, it timed out and later tell you one spring is out of control, I have been fighting with this for three days. Starting to get frustrated eventually.


author: Josef Platil
body: Hi Raphael, please check if you have enough memory allocated.


author: geodepe
body: How much is enough?


author: Raphael
body: Hi,all.

when I upgrade Confluence from 5.8.14 to 5.10.8, I also met the same issue.

and i found there were four main url requests cause the threads increase:
> https://localhost:8090/rest/quickreload/latest/
>
> https://localhost:8090/rest/analytics/1.0/publish/bulk
>
> https://localhost:8090/rest/mywork/latest/status/notification/count
>
> https://localhost:8090/json/startheartbeatactivity.action

Is there an official solution for this issue ?


author: Rilwan Ahmed
body: In confluence 5.10.4, I see this struck thread when we are running the load test. eventually it gets complete when the thread processor becomes free

**++Example:++** **06-Jun-2017 12:44:40.689** WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "**http-apr-8443-exec-1233" (id=2713)** has been active for 65,998 milliseconds (since 6/6/17 12:43 PM) to serve the same request for https://\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 147 thread(s) in total that are monitored by this Valve and may be stuck.

Once thread is completed, you can see below message in the Catalina.out

**06-Jun-2017 12:45:46.090** WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "**http-apr-8443-exec-1233**" (id=2713) was previously reported to be stuck but has completed. It was active for approximately 114,298 milliseconds. There is/are still 186 thread(s) that are monitored by this Valve and may be stuck.

comments: author: Raphael
body: such many stuck threads cause the application stuck and start failed... and the numbers of threads are increasing faster and faster...


author: Heshan Manamperi
body: I'm getting same issue in confluence 5.10.7 and what is the fix for this bug?


author: gowridhar madu
body: Same issue i see on my confluence 5.9.11 and due to that one of Confluence DC instance we are getting 500 Error.

09-Nov-2016 01:27:59.626 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-29" (id=267) has been active for 69,335 milliseconds (since 11/9/16 1:26 AM) to serve the same request for <https://escmconfluence.1dc.com/download/attachments/74685514/Session%202%20-%20Ease%20Application%20Overview.mp4> and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 1 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

at sun.misc.Unsafe.park(Native Method)

at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)

at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)

09-Nov-2016 07:06:24.899 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-34" (id=705) has been active for 67,996 milliseconds (since 11/9/16 7:05 AM) to serve the same request for <https://escmconfluence.1dc.com/display/Core360Control/Environment+Priorities?flashId=1427034727> and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 1 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

at java.lang.Object.wait(Native Method)

at com.hazelcast.spi.impl.BasicInvocationFuture.pollResponse(BasicInvocationFuture.java:265)

at com.hazelcast.spi.impl.BasicInvocationFuture.waitForResponse(BasicInvocationFuture.java:216)

at com.hazelcast.spi.impl.BasicInvocationFuture.get(BasicInvocationFuture.java:193)

09-Nov-2016 07:15:16.982 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-22" (id=260) has been active for 248,698 milliseconds (since 11/9/16 7:11 AM) to serve the same request for <https://escmconfluence.1dc.com/rest/mywork/latest/status/notification/count?_=1478693467722> and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 15 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

at sun.misc.Unsafe.park(Native Method)

at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

09-Nov-2016 07:15:17.289 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "http-nio-8090-exec-22" (id=260) was previously reported to be stuck but has completed. It was active for approximately 248,715 milliseconds. There is/are still 14 thread(s) that are monitored by this Valve and may be stuck.

09-Nov-2016 07:15:17.289 WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "http-nio-8090-exec-3" (id=228) was previously reported to be stuck but has completed. It was active for approximately 350,492 milliseconds. There is/are still 13 thread(s) that are monitored by this Valve and may be stuck.

09-Nov-2016 07:15:18.013 SEVERE \[http-nio-8090-exec-59\] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage\[errorCode=500, location=/500page.jsp\]

com.atlassian.cache.CacheException: Problem retrieving a value from cache com.atlassian.confluence.user.persistence.dao.ConfluenceRememberMeToken

comments: author: Harish Gunturu
body: Hello, Did you find any solution for this?

Thanks in advance!


Tags: confluence-administration

issue

thread