Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1506

tomcat shutdown - threads in PARK state

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.13.0
    • 2.0.0-M1
    • Core
    • None

    Description

      Hi Dan,

      Today I monitored threads created within our application while running on tomcat 8.5.3x64 because of an issue in my code.

      While doing that I noticed that there were two threads called Thread-7 and Thread-8 (name was stable during a lot of starts but only on the first start) that I wasn't able to find in my code so I debugged a bit deeper and found that they were created in org.apache.isis.core.runtime.threadpool.ThreadPoolSupport:76 during start-up.

      After that they are going to state PARK and reside even when undeploying the application from tomcat.

      I haven't looked much at your code but I believe you should call shutdown on the ThreadPoolExecutor that you are using once you are finished or in PreDestroy situation. At least I had a very similar issue in my application and shutdown() solved it.

      Please find attached a screenshot of IntelliJ view during debug, the screenshot of VisualVM and the catalina log from tomcat complaining about these two threads.

      Attachments

        1. Java VisualVM.PNG
          76 kB
          Timothy Simecsek
        2. IntelliJ Debug.PNG
          46 kB
          Timothy Simecsek
        3. catalina.log
          3 kB
          Timothy Simecsek

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hobrom Andi Huber
            Timothy Timothy Simecsek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment