Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4014218753 for ; Mon, 19 Oct 2015 14:33:11 +0000 (UTC) Received: (qmail 76268 invoked by uid 500); 19 Oct 2015 14:33:05 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 75677 invoked by uid 500); 19 Oct 2015 14:33:05 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 75653 invoked by uid 99); 19 Oct 2015 14:33:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2015 14:33:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 34D3C2C1F65 for ; Mon, 19 Oct 2015 14:33:05 +0000 (UTC) Date: Mon, 19 Oct 2015 14:33:05 +0000 (UTC) From: "adam brin (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4536) potential memory leak with annotationActionValidatorManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14963389#comment-14963389 ] adam brin commented on WW-4536: ------------------------------- Hi Lukasz, Apologies for the delay, I've been traveling. I downloaded the snapshot and tested about 100 URL requests after removing out @SkipValidation calls, it seems much better. I don't see the entries in the heap analyzer in any quantity. > potential memory leak with annotationActionValidatorManager > ----------------------------------------------------------- > > Key: WW-4536 > URL: https://issues.apache.org/jira/browse/WW-4536 > Project: Struts 2 > Issue Type: Bug > Components: XML Validators > Affects Versions: 2.3.20 > Reporter: adam brin > Assignee: Lukasz Lenart > Fix For: 2.3.25 > > Attachments: Screen Shot 2015-08-16 at 1.48.30 PM.png, Screen Shot 2015-08-16 at 1.49.22 PM.png > > > We've recently been having issues with our app crashing and trying to track down the root causes. One of the things we've seen is that over the course of 1 day, 50% of our memory (almost 620 MB of 1.2 GB) is allocated to "com.opensymphony.xwork.validator.AnnotationActionValidatorManager" according to the heap dump. We also see millions of entries in two SynchronizedMap's: > * validatorCache (1,635,019 entries) > * validatorFileCache (87,321 entries) > Looking through the entries in the validator cache, we se entries for every unique page browsed within the app. Note: we're using staticParam mapping and NamedVariable PatternMatching in action names e.g. {{"$\{id\}/$\{slug\}"}} so effectively every url is unique. > Looking at the source code, should these maps perhaps be "WeakHashMaps" or WeakReferences so that they're disposed of? > (source code to the app is here: https://bitbucket.org/tdar/tdar.src/src ) -- This message was sent by Atlassian JIRA (v6.3.4#6332)