Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-130

Memory Leaks with ThreadLocals in Tomcat

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Fedora, Tomcat
    • # Replies:
      31
    • Last comment by Customer:
      true

      Description

      When running mongo 2.0 in a tomcat environment I can see the following logs in the catalina.out, and the tomcat web server can't be stopped any more without killing it, it seems that there's a non-deamon thread still hanging.

      SEVERE: A web application created a ThreadLocal with key of type [null] (value [com.mongodb.DBTCPConnector$1@d5ba1ef]) and a value of type [com.mongodb.DBTCPConnector.MyPort] (value [com.mongodb.DBTCPConnector$MyPort@7ae458c2]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
      Jul 8, 2010 7:28:23 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: A web application created a ThreadLocal with key of type [null] (value [com.mongodb.OutMessage$1@257f6796]) and a value of type [com.mongodb.OutMessage] (value [com.mongodb.OutMessage@4f69bc15]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
      Jul 8, 2010 7:28:23 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: A web application created a ThreadLocal with key of type [null] (value [com.mongodb.Response$1@26bb2f6e]) and a value of type [org.bson.BSONDecoder] (value [org.bson.BSONDecoder@4b26f29f]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

        Attachments

          Activity

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                6 years, 50 weeks, 6 days ago
                Date of 1st Reply: