Thread stuck periodically
Asked by Alexander Schilling:

Hello,

We run a self-hosted confluence as our own help page. Since the installation, threads stuck periodically up to 200 threads and then block the use of the page for approximate 20 minutes (proxy error). I have already tried some things and am little puzzled about it, because i cant get rid of this.

key-data:

postgres (9.4.13) - max-connections = 300 (3 reserved)  
confluence (6.5.1) - hibernate.c3p0.max_size = 250  
tomcat - maxThreads = 200  
java8

I have already read the other requests here with threads getting stuck, but I couldn't find any tips.

WARNING \[ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]\] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-467" (id=10682) has been active for 62,719 milliseconds (since 1/4/18 12:52 AM) to serve the same request for \[\*our-help-site\*\]/plugins/macrobrowser/browse-macros.action?detailed=false\&macroMetadataClientCacheKey=1514981697420 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.

2 3 4 ... and soone

![active_threads.JPG](/t5/image/serverpage/image-id/12011i84E692AF48BD733A/image-size/large?v=v2&px=999 "active_threads.JPG")

It looks periodic, but can't find a task in confluence or anything else that could cause this. (no cronjobs)

Does anyone have an idea about this please?


Answers:
author: Alexander Schilling
body: We got the problem solved.

We created a clone of the VM to investigate and try and the clone didn't have the same problems as the original VM, also not if we let the real traffic go on it.

So since some months we use the cloned machine and deleted the original VM image.


author: Jackie Chen
body: [@Alexander Schilling](/t5/user/viewprofilepage/user-id/65253) Looks like there is a pattern. Are there scheduled jobs that run every 2 hours? like backup etc.

comments: author: Alexander Schilling
body: no, nothing


author: AnnWorley
body: To investigate the issue you are reporting we need to examine logs and configuration files that we can't share on the Community forum. I created a ticket on your behalf, you should receive an email from our support portal shortly.

After we resolve the issue we can circle back to let the Community know.

comments: author: Michael Wallis
body: Was there any resolution?


author: AnnWorley
body: It turned out to be an issue particular to Alexander's environment. After determining that the application was not the culprit, no details were shared on the ticket. Perhaps [@Alexander Schilling](/t5/user/viewprofilepage/user-id/65253) can shed more light.


author: Sujit Kumar
body: [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) : Can you let us know what type of environment parameters can cause such issues. We even see similar errors in our logs as well.


author: Phil
body: [@Alexander Schilling](/t5/user/viewprofilepage/user-id/65253)could you please shed some light on this issue? I have this issue and it appears as though [@Sujit Kumar](/t5/user/viewprofilepage/user-id/628191) has this issue too. My head is getting sore from hitting the wall by my desk on this one..

Was it an SELINUX issue? Confluence being behind an HTTPD proxy? HTTPD and Tomcat are behind an AWS ELB?

pls halp!!


author: Hung Cao
body: Hello [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) [@Alexander Schilling](/t5/user/viewprofilepage/user-id/65253), so what is the root cause here?

Because our Confluence has the same symptom. And every time it gets stuck, we have to restart the service?