Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:26:45+00:00 2026-06-15T09:26:45+00:00

I have a Java web application running on Tomcat 7 that appears to have

  • 0

I have a Java web application running on Tomcat 7 that appears to have a memory leak. The average memory usage of the application increases linearly over time when under load (determined using JConsole). After the memory usage reaches the plateau, performance degrades significantly. Response times go from ~100ms to [300ms, 2500ms], so this is actually causing real problems.

JConsole memory profile of my application:
application memory profile

Using VisualVM, I see that at least half the memory is being used by character arrays (i.e. char[]) and that most (roughly the same number of each, 300,000 instances) of the strings are one of the following: “Allocation Failure”, “Copy”, “end of minor GC”, all of which seem to be related to garbage collection notification. As far as I know, the application doesn’t monitor the garbage collector at all. VisualVM can’t find a GC root for any of these strings, so I’m having a hard time tracking this down.

Memory Analyzer heap dump:
heap dump, unreachable memory

I can’t explain why the memory usage plateaus like that, but I have a theory as to why performance degrades once it does. If memory is fragmented, the application could take a long time to allocate a contiguous block of memory to handle new requests.

Comparing this to the built-in Tomcat server status application, the memory increases and levels off at, but doesn’t hit a high “floor” like my application. It also doesn’t have the high number of unreachable char[].

JConsole memory profile of Tomcat server status application:
enter image description here

Memory Analyzer heap dump of Tomcat server status applicationp:
enter image description here

Where could these strings be allocated and why are they not being garbage collected? Are there Tomcat or Java settings that could affect this? Are there specific packages that could be affect this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:26:46+00:00Added an answer on June 15, 2026 at 9:26 am

    I removed the following JMX configuration from tomcat\bin\setenv.bat:

    set "JAVA_OPTS=%JAVA_OPTS% 
        -Dcom.sun.management.jmxremote=true 
        -Dcom.sun.management.jmxremote.port=9090
        -Dcom.sun.management.jmxremote.ssl=false
        -Dcom.sun.management.jmxremote.authenticate=false"
    

    I can’t get detailed memory heap dumps anymore, but the memory profile looks much better:
    enter image description here

    24 hours later, the memory profile looks the same:
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java web application that I'm running with tomcat. This application has
I have a basic web application written in Java, running on a tomcat on
I have a java web application running on tomcat, and will use single sign
I have a Java web application running on Tomcat. I want to load static
I have a web application running on Tomcat 6 and a Java-programmed client application.
I have a java web application that I am developing in Netbeans (and running
We have a Java EE-based web application running on a Glassfish app server cluster.
I am running a web application using Tomcat and Java Servlets, JSP's, etc. I
We have a web application running on Tomcat 7 and it loads a JNI
All, I am having some trouble running a java web start application that has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.