{"id":29794,"date":"2023-12-18T08:15:00","date_gmt":"2023-12-18T07:15:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=29794"},"modified":"2023-12-14T17:35:57","modified_gmt":"2023-12-14T16:35:57","slug":"howto-detect-and-analyze-long-stuck-threads-in-tomcat","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/","title":{"rendered":"HowTo &#8211; Detect and analyze long\/stuck threads in Tomcat"},"content":{"rendered":"\n<p>Most Application Servers allow for long and\/or stuck threads detection, to let you know that something is currently very slow, waiting on something or just simply stuck. On tomcat, this isn&#8217;t enabled by default, and you need to manually configure it as needed. But once done, it will start displaying information into the logs that can be used to find some patterns, some issues on your environments\/application. In this blog, I will use a Documentum D2 application hosted on Tomcat. As you probably know, Documentum and D2 are quite the complex software, an out-of-the-box WAR file of D2 will be around 1.1Gb once exploded, so you can imagine there quite a bit of things happening inside.<\/p>\n\n\n\n<p>First of all, the configuration of Tomcat. To be able to display information on the long running threads, you will need to add the corresponding Tomcat Valve into the &#8220;<em>server.xml<\/em>&#8221; file. As far as I know, the configuration for this didn&#8217;t change recently and it&#8217;s pretty well <a href=\"https:\/\/tomcat.apache.org\/tomcat-10.0-doc\/config\/valve.html#Stuck_Thread_Detection_Valve\" target=\"_blank\" rel=\"noreferrer noopener\">documented<\/a> as everything else with Apache. There are two optional parameters for this valve:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>threshold<\/em>: Duration in seconds after which a thread will be considered &#8220;stuck&#8221; and will be tracked in the logs, default to 600s (10min)<\/li>\n\n\n\n<li><em>interruptThreadThreshold<\/em>: Duration in seconds after which Tomcat will try to stop the thread, default to -1 (disabled)<\/li>\n<\/ul>\n\n\n\n<p>Therefore, to enable it, you simply need to add the valve as done below and then restart Tomcat:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [3,14,15,21,38]; title: ; notranslate\" title=\"\">\n&#x5B;tomcat@d2-0 ~]$ cd $CATALINA_HOME\/conf\/\n&#x5B;tomcat@d2-0 conf]$\n&#x5B;tomcat@d2-0 conf]$ cat server.xml\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n...\n&lt;Server port=&quot;8005&quot; shutdown=&quot;b018b3d58bdbb490a1b2baed3c2efaee&quot;&gt;\n  ...\n  &lt;Service name=&quot;Catalina&quot;&gt;\n    ...\n    &lt;Engine name=&quot;Catalina&quot; defaultHost=&quot;localhost&quot;&gt;\n      ...\n      &lt;Host name=&quot;localhost&quot;  appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;&gt;\n        ...\n        &lt;Valve className=&quot;org.apache.catalina.valves.StuckThreadDetectionValve&quot;\n               threshold=&quot;120&quot; \/&gt;\n      &lt;\/Host&gt;\n    &lt;\/Engine&gt;\n  &lt;\/Service&gt;\n&lt;\/Server&gt;\n&#x5B;tomcat@d2-0 conf]$\n&#x5B;tomcat@d2-0 conf]$ stopTomcat\n  **\n  **  Apache Tomcat is running with PID: 4210\n  **\nUsing CATALINA_BASE:   $CATALINA_HOME\nUsing CATALINA_HOME:   $CATALINA_HOME\nUsing CATALINA_TMPDIR: $DATA_HOME\/temp\nUsing JRE_HOME:        $JAVA_HOME\nUsing CLASSPATH:       $CATALINA_HOME\/bin\/bootstrap.jar:$CATALINA_HOME\/bin\/tomcat-juli.jar\nUsing CATALINA_OPTS:\nUsing CATALINA_PID:    $DATA_HOME\/tomcat.pid\nNOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base\/java.lang=ALL-UNNAMED --add-opens=java.base\/java.io=ALL-UNNAMED --add-opens=java.base\/java.util=ALL-UNNAMED --add-opens=java.base\/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi\/sun.rmi.transport=ALL-UNNAMED\nTomcat stopped.\n  **\n  **  Apache Tomcat is shutdown\n  **\n&#x5B;tomcat@d2-0 conf]$\n&#x5B;tomcat@d2-0 conf]$ startTomcat\n  **\n  **  Apache Tomcat is shutdown\n  **\nCleanup of app_data for &quot;D2&quot;\n\nUsing CATALINA_BASE:   $CATALINA_HOME\nUsing CATALINA_HOME:   $CATALINA_HOME\nUsing CATALINA_TMPDIR: $DATA_HOME\/temp\nUsing JRE_HOME:        $JAVA_HOME\nUsing CLASSPATH:       $CATALINA_HOME\/bin\/bootstrap.jar:$CATALINA_HOME\/bin\/tomcat-juli.jar\nUsing CATALINA_OPTS:\nUsing CATALINA_PID:    $DATA_HOME\/tomcat.pid\nTomcat started.\n  **\n  **  Apache Tomcat is running with PID: 8426\n  **\n&#x5B;tomcat@d2-0 conf]$\n<\/pre><\/div>\n\n\n<p>Now that messages are being printed on the logs, it&#8217;s a first step but it might take some time to analyze these. For that purpose, you can write a parser to find all messages and extract the needed information. Of course, such tool would be sensitive to the log format (length of date\/timestamp, number of fields you integrated in the logs, etc.). Here is an example of a thread being detected as stuck (&#8220;<em>threshold<\/em>&#8221; of 120s) and its successful completion:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n&#x5B;tomcat@d2-0 conf]$ cd $CATALINA_HOME\/logs\/\n&#x5B;tomcat@d2-0 logs]$\n&#x5B;tomcat@d2-0 logs]$ grep notifyStuckThread catalina.out\n...\n2023-12-13 10:03:21,079 UTC WARNING &#x5B;Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread &#x5B;https-jsse-nio-8080-exec-417] (id=&#x5B;27927]) has been active for &#x5B;122,196] milliseconds (since &#x5B;12\/13\/23 10:01 AM]) to serve the same request for &#x5B;https:\/\/dctm-env1.domain.com\/D2\/x3_portal\/searchManagerService] and may be stuck (configured threshold for this StuckThreadDetectionValve is &#x5B;120] seconds). There is\/are &#x5B;2] thread(s) in total that are monitored by this Valve and may be stuck.\n...\n2023-12-13 10:03:31,090 UTC WARNING &#x5B;Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread &#x5B;https-jsse-nio-8080-exec-417] (id=&#x5B;27927]) was previously reported to be stuck but has completed. It was active for approximately &#x5B;127,144] milliseconds. There is\/are still &#x5B;1] thread(s) that are monitored by this Valve and may be stuck.\n...\n&#x5B;tomcat@d2-0 logs]$\n<\/pre><\/div>\n\n\n<p>On the above example, the thread started around <em>10:01:19<\/em>, was detected as stuck <em>122s<\/em> later (<em>10:03:21<\/em>) and completed after <em>127s<\/em> (<em>10:03:26<\/em>). It was related to a search request in D2 and at the time of the detection, there was already another thread stuck (2 threads stuck in the &#8220;<em>notifyStuckThreadDetected<\/em>&#8220;). When it completed, there was still another thread stuck (1 thread stuck in the &#8220;<em>notifyStuckThreadCompleted<\/em>&#8220;). That&#8217;s the kind of information you can get from the Tomcat logs.<\/p>\n\n\n\n<p>Here is an example of parser that will work with this logging format, it&#8217;s using &#8220;<em>awk<\/em>&#8221; to read all the lines, find the &#8220;<em>notifyStuckThreadDetected<\/em>&#8221; occurrences, find the associated &#8220;<em>notifyStuckThreadCompleted<\/em>&#8221; occurrences and then display all the needed information in a summary table. In case the thread is still running (didn&#8217;t complete yet), it will also mark it as such:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;tomcat@d2-0 logs]$ cd\n&#x5B;tomcat@d2-0 ~]$\n&#x5B;tomcat@d2-0 ~]$ cat parse_stuck.awk\nBEGIN {\n  print &quot;============================================&quot;;\n  print &quot;========== COMPLETED LONG THREADS ==========&quot;;\n  print &quot;============================================&quot;;\n  printf(&quot;%-25s\\t%20s\\t%12s\\t%10s\\t%12s\\t%3s\\t%-s\\n&quot;,&quot;THREAD&quot;,&quot;STIME&quot;,&quot;DTIME&quot;,&quot;DURATION&quot;,&quot;CTIME&quot;,&quot;NUM&quot;,&quot;REQUEST&quot;);\n}\n\n\/.\/ {\n  sub(&quot;UTC&quot;,&quot;&quot;);\n}\n\n\/org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected\/ {\n  thread=substr($7,2,length($7)-2);\n  dtime&#x5B;thread]=$2;\n  tmp=substr($0,index($0,&quot;since&quot;)+6);\n  stime&#x5B;thread]=substr(tmp,1,index(tmp,&quot;)&quot;)-1);\n  tmp=substr($0,index($0,&quot;active for &quot;)+11);\n  duration&#x5B;thread]=substr(tmp,1,index(tmp,&quot; &quot;)-1);\n  tmp=substr($0,index($0,&quot;request for &quot;)+12);\n  request&#x5B;thread]=substr(tmp,1,index(tmp,&quot; &quot;)-1);\n  tmp=substr($0,index($0,&quot;is\/are &quot;)+7);\n  count_stuck&#x5B;thread]=substr(tmp,1,index(tmp,&quot; &quot;)-1);\n  ended&#x5B;thread]=0;\n}\n\n\/org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted\/ {\n  thread=substr($7,2,length($7)-2);\n  tmp=substr($0,index($0,&quot;approximately &quot;)+14);\n  duration&#x5B;thread]=substr(tmp,1,index(tmp,&quot; &quot;)-1);\n  ctime&#x5B;thread]=$2;\n  ended&#x5B;thread]=1;\n  tmp=substr($0,index($0,&quot;is\/are still &#x5B;&quot;)+14);\n  nb_stuck&#x5B;thread]=substr(tmp,1,index(tmp,&quot;]&quot;)-1);\n\n  printf(&quot;%-25s\\t%20s\\t%s\\t%10s\\t%s\\t%3d\\t%-s\\n&quot;,thread,stime&#x5B;thread],dtime&#x5B;thread],duration&#x5B;thread],ctime&#x5B;thread],nb_stuck&#x5B;thread],request&#x5B;thread]);\n\n  dtime&#x5B;thread]=&quot;&quot;;\n  ctime&#x5B;thread]=&quot;&quot;;\n  stime&#x5B;thread]==&quot;&quot;;\n  duration&#x5B;thread]==&quot;&quot;;\n  request&#x5B;thread]==&quot;&quot;;\n  count_stuck&#x5B;thread]==&quot;&quot;;\n  nb_stuck&#x5B;thread]==&quot;&quot;;\n  ended&#x5B;thread]==&quot;&quot;;\n}\n\nEND {\n  print &quot;&quot;;\n  print &quot;============================================&quot;;\n  print &quot;======= CURRENTLY STUCK LONG THREADS =======&quot;;\n  print &quot;============================================&quot;;\n  printf(&quot;%-25s\\t%20s\\t%12s\\t%10s\\t%-s\\n&quot;,&quot;THREAD&quot;,&quot;STIME&quot;,&quot;DTIME&quot;,&quot;DURATION&quot;,&quot;REQUEST&quot;);\n  for ( i in ended ) {\n    if (ended&#x5B;i]==0) {\n      printf(&quot;%-25s\\t%20s\\t%s\\t%10s\\t%-s\\n&quot;,i,stime&#x5B;i],dtime&#x5B;i],duration&#x5B;i],request&#x5B;i]);\n    }\n  }\n}\n&#x5B;tomcat@d2-0 ~]$\n<\/pre><\/div>\n\n\n<p>The execution of this small parser is quite simple, here are two examples:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;tomcat@d2-0 ~]$ cat $CATALINA_HOME\/logs\/catalina.out | awk -f parse_stuck.awk\n============================================\n========== COMPLETED LONG THREADS ==========\n============================================\nTHREAD                                         STIME           DTIME      DURATION             CTIME    NUM     REQUEST\nhttps-jsse-nio-8080-exec-420     &#x5B;12\/14\/23, 4:53 AM]    04:55:44,045     &#x5B;228,883]      04:57:24,983      0     &#x5B;https:\/\/dctm-env1.domain.com\/D2\/servlet\/ExportContent?uid=...]\nhttps-jsse-nio-8080-exec-463     &#x5B;12\/14\/23, 5:03 AM]    05:05:36,427     &#x5B;240,259]      05:07:31,980      0     &#x5B;https:\/\/dctm-env1.domain.com\/D2\/x3_portal\/searchManagerService]\nhttps-jsse-nio-8080-exec-502     &#x5B;12\/14\/23, 5:34 AM]    05:36:34,645     &#x5B;185,688]      05:37:38,489      0     &#x5B;https:\/\/dctm-env1.domain.com\/D2\/servlet\/ExportContent?uid=...]\nhttps-jsse-nio-8080-exec-355     &#x5B;12\/14\/23, 7:41 AM]    07:43:48,877     &#x5B;165,236]      07:44:38,900      0     &#x5B;https:\/\/dctm-env1.domain.com\/D2\/x3_portal\/doclistService]\n\n============================================\n======= CURRENTLY STUCK LONG THREADS =======\n============================================\nTHREAD                                         STIME           DTIME      DURATION      REQUEST\nhttps-jsse-nio-8080-exec-355    &#x5B;12\/14\/23, 11:49 AM]    11:51:22,124     &#x5B;121,961]      &#x5B;https:\/\/dctm-env1.domain.com\/D2\/x3_portal\/doclistService]\n&#x5B;tomcat@d2-0 ~]$\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;tomcat@d2-0 ~]$ cat $CATALINA_HOME\/logs\/catalina.out | awk -f parse_stuck.awk\n============================================\n========== COMPLETED LONG THREADS ==========\n============================================\nTHREAD                                         STIME           DTIME      DURATION             CTIME    NUM     REQUEST\nhttps-jsse-nio-8080-exec-33       &#x5B;12\/6\/23, 2:37 PM]    14:39:47,521     &#x5B;280,031]      14:42:27,965      0     &#x5B;https:\/\/dctm-env2.domain.com\/D2\/x3_portal\/checkoutDocumentService]\nhttps-jsse-nio-8080-exec-21       &#x5B;12\/6\/23, 4:36 PM]    16:38:45,420     &#x5B;268,730]      16:41:15,626      0     &#x5B;https:\/\/dctm-env2.domain.com\/D2\/x3_portal\/searchManagerService]\nhttps-jsse-nio-8080-exec-29      &#x5B;12\/12\/23, 9:26 PM]    21:28:57,339     &#x5B;154,656]      21:29:27,356      1     &#x5B;https:\/\/dctm-env2.domain.com\/D2\/x3_portal\/propertiesService]\nhttps-jsse-nio-8080-exec-33      &#x5B;12\/12\/23, 9:26 PM]    21:28:47,332     &#x5B;168,044]      21:29:27,357      0     &#x5B;https:\/\/dctm-env2.domain.com\/D2\/x3_portal\/propertiesService]\n\n============================================\n======= CURRENTLY STUCK LONG THREADS =======\n============================================\nTHREAD                                         STIME           DTIME      DURATION      REQUEST\n&#x5B;tomcat@d2-0 ~]$\n<\/pre><\/div>\n\n\n<p>The different columns are the following ones:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>THREAD: Name of the thread, can be used to find the start\/end of the request<\/li>\n\n\n\n<li>STIME: Start date\/time of the thread<\/li>\n\n\n\n<li>DTIME: Detection time of the thread (~120s after STIME)<\/li>\n\n\n\n<li>DURATION: Total duration of the thread<\/li>\n\n\n\n<li>CTIME: Completion time of the thread (~DURATIONs after STIME)<\/li>\n\n\n\n<li>NUM: Number of threads still stuck<\/li>\n\n\n\n<li>REQUEST: URL used that triggered the thread<\/li>\n<\/ul>\n\n\n\n<p>That concludes this blog, hopefully you find this information useful to debug\/improve your applications. Don&#8217;t hesitate to change the threshold of 120 seconds in the Tomcat configuration to something relevant for your use-case.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Application Servers allow for long and\/or stuck threads detection, to let you know that something is currently very slow, waiting on something or just simply stuck. On tomcat, this isn&#8217;t enabled by default, and you need to manually configure it as needed. But once done, it will start displaying information into the logs that [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[525],"tags":[839,2609,551,552,771,3204],"type_dbi":[],"class_list":["post-29794","post","type-post","status-publish","format-standard","hentry","category-enterprise-content-management","tag-apache","tag-documentum-2","tag-stuck","tag-thread","tag-tomcat","tag-valve"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>HowTo - Detect and analyze long\/stuck threads in Tomcat - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HowTo - Detect and analyze long\/stuck threads in Tomcat\" \/>\n<meta property=\"og:description\" content=\"Most Application Servers allow for long and\/or stuck threads detection, to let you know that something is currently very slow, waiting on something or just simply stuck. On tomcat, this isn&#8217;t enabled by default, and you need to manually configure it as needed. But once done, it will start displaying information into the logs that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-18T07:15:00+00:00\" \/>\n<meta name=\"author\" content=\"Morgan Patou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MorganPatou\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Morgan Patou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\"},\"author\":{\"name\":\"Morgan Patou\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8\"},\"headline\":\"HowTo &#8211; Detect and analyze long\/stuck threads in Tomcat\",\"datePublished\":\"2023-12-18T07:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\"},\"wordCount\":579,\"commentCount\":0,\"keywords\":[\"Apache\",\"Documentum\",\"Stuck\",\"Thread\",\"Tomcat\",\"Valve\"],\"articleSection\":[\"Enterprise content management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\",\"name\":\"HowTo - Detect and analyze long\/stuck threads in Tomcat - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2023-12-18T07:15:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HowTo &#8211; Detect and analyze long\/stuck threads in Tomcat\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8\",\"name\":\"Morgan Patou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g\",\"caption\":\"Morgan Patou\"},\"description\":\"Morgan Patou has over 12 years of experience in Enterprise Content Management (ECM) systems, with a strong focus in recent years on platforms such as Alfresco, Documentum, and M-Files. He specializes in the architecture, setup, customization, and maintenance of ECM infrastructures in complex &amp; critical environments. Morgan is well-versed in both engineering and operations aspects, including high availability design, system integration, and lifecycle management. He also has a solid foundation in open-source and proprietary technologies - ranging from Apache, OpenLDAP or Kerberos to enterprise-grade systems like WebLogic. Morgan Patou holds an Engineering Degree in Computer Science from ENSISA (\u00c9cole Nationale Sup\u00e9rieure d'Ing\u00e9nieurs Sud Alsace) in Mulhouse, France. He is Alfresco Content Services Certified Administrator (ACSCA), Alfresco Content Services Certified Engineer (ACSCE) as well as OpenText Documentum Certified Administrator. His industry experience spans the Public Sector, IT Services, Financial Services\/Banking, and the Pharmaceutical industry.\",\"sameAs\":[\"https:\/\/blog.dbi-services.com\/author\/morgan-patou\/\",\"https:\/\/x.com\/MorganPatou\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/morgan-patou\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"HowTo - Detect and analyze long\/stuck threads in Tomcat - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/","og_locale":"en_US","og_type":"article","og_title":"HowTo - Detect and analyze long\/stuck threads in Tomcat","og_description":"Most Application Servers allow for long and\/or stuck threads detection, to let you know that something is currently very slow, waiting on something or just simply stuck. On tomcat, this isn&#8217;t enabled by default, and you need to manually configure it as needed. But once done, it will start displaying information into the logs that [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/","og_site_name":"dbi Blog","article_published_time":"2023-12-18T07:15:00+00:00","author":"Morgan Patou","twitter_card":"summary_large_image","twitter_creator":"@MorganPatou","twitter_misc":{"Written by":"Morgan Patou","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/"},"author":{"name":"Morgan Patou","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8"},"headline":"HowTo &#8211; Detect and analyze long\/stuck threads in Tomcat","datePublished":"2023-12-18T07:15:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/"},"wordCount":579,"commentCount":0,"keywords":["Apache","Documentum","Stuck","Thread","Tomcat","Valve"],"articleSection":["Enterprise content management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/","url":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/","name":"HowTo - Detect and analyze long\/stuck threads in Tomcat - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-12-18T07:15:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/howto-detect-and-analyze-long-stuck-threads-in-tomcat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"HowTo &#8211; Detect and analyze long\/stuck threads in Tomcat"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c4d05b25843a9bc2ab20415dae6bd2d8","name":"Morgan Patou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5d7f5bec8b597db68a09107a6f5309e3870d6296ef94fb10ead4b09454ca67e5?s=96&d=mm&r=g","caption":"Morgan Patou"},"description":"Morgan Patou has over 12 years of experience in Enterprise Content Management (ECM) systems, with a strong focus in recent years on platforms such as Alfresco, Documentum, and M-Files. He specializes in the architecture, setup, customization, and maintenance of ECM infrastructures in complex &amp; critical environments. Morgan is well-versed in both engineering and operations aspects, including high availability design, system integration, and lifecycle management. He also has a solid foundation in open-source and proprietary technologies - ranging from Apache, OpenLDAP or Kerberos to enterprise-grade systems like WebLogic. Morgan Patou holds an Engineering Degree in Computer Science from ENSISA (\u00c9cole Nationale Sup\u00e9rieure d'Ing\u00e9nieurs Sud Alsace) in Mulhouse, France. He is Alfresco Content Services Certified Administrator (ACSCA), Alfresco Content Services Certified Engineer (ACSCE) as well as OpenText Documentum Certified Administrator. His industry experience spans the Public Sector, IT Services, Financial Services\/Banking, and the Pharmaceutical industry.","sameAs":["https:\/\/blog.dbi-services.com\/author\/morgan-patou\/","https:\/\/x.com\/MorganPatou"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/morgan-patou\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/29794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=29794"}],"version-history":[{"count":2,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/29794\/revisions"}],"predecessor-version":[{"id":29797,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/29794\/revisions\/29797"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=29794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=29794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=29794"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=29794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}