From users-return-267135-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Thu Mar 14 21:15:17 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 55574180630 for ; Thu, 14 Mar 2019 22:15:17 +0100 (CET) Received: (qmail 44192 invoked by uid 500); 14 Mar 2019 21:15:15 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 44181 invoked by uid 99); 14 Mar 2019 21:15:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Mar 2019 21:15:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id F029EC1856 for ; Thu, 14 Mar 2019 21:15:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.798 X-Spam-Level: * X-Spam-Status: No, score=1.798 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fv4AofVYJjgs for ; Thu, 14 Mar 2019 21:15:13 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3AE455F41A for ; Thu, 14 Mar 2019 21:15:13 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id d21so4430898edx.12 for ; Thu, 14 Mar 2019 14:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0e/fODhesCzJI5B9aw244INMT+CeYjlo7x+VmP1/2qk=; b=FcN+i/k5AQxDtCOB+NAgNcGneuot4MgXzjIxSWVXybuRYzZU2dECf7eHIlrnGFuzQF bNRQnkFDQWlRSPuBkldEsGndud801USL/FGyoET6rvOlVQV/OH8ZcIREP79KVab4qAM0 9whcu2N719snTDZHd7ujfp92o3Z1hz8Q6Zfswyp8ij7QU9wvn0e/RPzi506iRvHb7cjj 35bXwL+8ZCQFkqABi0PquKkmDikF93pg1dZao8uQuhjaihUiS5125GRURQ53u36rPRxY KRhG/uTQZRBof9Q7WnF5/onNcwyKl3FBzsCdncMtHApnbQxEdZgglQEfn17CqbYI9CPI ClpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0e/fODhesCzJI5B9aw244INMT+CeYjlo7x+VmP1/2qk=; b=J49aZCgV/Y36+0fnXhlbp99oYoeHibm1oI+zg803QlKqwZ5diqNFkuoWLktcOq6/Rk EaUPOXv5RCqjcChXnzsvmDW5L3udoFjFSBjNsiDX5J1MVKZ8Sok852+IYAGaeVFPScYt q66j0TF56gCSvwMBx6enNWQZOHMPRABJ9WNLgXtFBfoGgpkCR+sJCvYt+wS7VwFPbyJD q4tHdNUVNLy6VGwBh3NW7kLHq7lRlKR171uVWgJhWFnIEBg66aF+AvWHbY77f4/BXsfb MBcy9q6PlHRFinkpvBU3jO4OoRHmblPHrG29pXKgA1dSRYYv0LpvOBbG5IDATJ/MwV7d 13xg== X-Gm-Message-State: APjAAAWK3mh7ldWU9IWVUoQpT4jjBGRXn35V6vxraGvYYg2Tz350CiLP JblvcXyqh8H8LcMiU9hxNq70MHq0R7qn62dUca+qIrlE X-Google-Smtp-Source: APXvYqzAMQgWwqbE/x7r07ASVvhp3jddKMZXiC4vtufeC0LmszK8uAIlCdatYePljZjFsyU5QGWr1ukCChi5K7HMg5k= X-Received: by 2002:a17:906:7a41:: with SMTP id i1mr62922ejo.106.1552598112557; Thu, 14 Mar 2019 14:15:12 -0700 (PDT) MIME-Version: 1.0 From: Shankar P S Date: Thu, 14 Mar 2019 14:15:01 -0700 Message-ID: Subject: 2 instance of ParallelWebAppClassLoaders in Tomcat JVM To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary="000000000000fa61a70584146acc" --000000000000fa61a70584146acc Content-Type: text/plain; charset="UTF-8" Version - Tomcat 8.5.38 OS - Centos 7.6 JVM - openjdk 1.8, 4 CPU We recently upgraded an existing server running a Spring 3.0 web app from Tomcat 8.5.35 to 8.5.38. After the upgrade, I noticed OutOfMemory exceptions several times. Increasing the heap size (-Xmx) several times upto nearly twice (from 6 GB to 10 GB) helped bring the problem under control. I was worried about a memory leak and so took a heap dump. Upon inspection I noticed that there were 2 copies of 2 large HashMap objects that we use as a cache for fast lookup. I noticed that this was because there were 2 instances of org.apache.catalina.loader.ParallelWebappClassLoader. Downgrading to 5.3.35, reduced the heap size to half and the problem was gone. In the new heap dump, there was only one instance of ParallelWebappClassLoader. My question is - why does Tomcat 5.3.38 create 2 instances of ParallelWebappClassLoader, while 5.3.35 creates only one?Is there a way to conigure the number of instances of ParallelWebappClassLoaderwhen upgrading to 8.5.38? Thanks for reading. I have also posted the same problem in Stackoverflow - https://stackoverflow.com/questions/55154963/behavior-of-multiple-instance-of-parallelwebappclassloaders-in-tomcat-jvm-retain --000000000000fa61a70584146acc--