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

  • Home
  • SEARCH
  • 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 8180771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:17:58+00:00 2026-06-07T00:17:58+00:00

Tomcat has got that well-known memory leak problem that causes PermGen space errors after

  • 0

Tomcat has got that well-known memory leak problem that causes PermGen space errors after too much redeploying.

What I’d like to know is best practices to reload the server in a way that completely resets that space and erases existing memory leaks. Just using shutdown.sh and startup.sh isn’t cutting it: it seems that leaked memory stays leaked. Rebooting the machine works of course, but I’d like to know if a quicker/cleaner/safer solution exists.

Thanks!

(I can allocate more PermGen space, of course, but that’s just delaying the problem, and I’d like to flush away the leaked memory before I declare the apps as production-ready, since I’m changing jobs afterwards and thus the apps won’t get redeployed for a while)

EDIT: as mentioned in the comments below, it seems the scripts are supposed to flush all memory already since they create a new JVM, so there must be some other factor causing PermGen errors to keep happening even in a new JVM, after many redeploys.

  • 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-07T00:18:01+00:00Added an answer on June 7, 2026 at 12:18 am

    Tomcat does not have PermGen leaks, webapp redeploys or not. The problem is either with your webapp itself, a library you use, or, in some cases, the Java standard library implementation. All of these can be solved without resorting to throwing up your arms and blaming Tomcat.

    Try reading http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf to learn how to diagnose these leaks properly. Get yourself a profiler (this can even be done with freely-available utilities included in the JDK like JVisualVM).

    Tomcat 7 includes a memory leak prevention utility that can work-around problematic Java API implementations (e.g. AWT). Everything else is your problem or your libraries’ problems. Most open-source libraries where such PermGen leaks have been found have quickly worked to patch their libraries in order to avoid them (or provide a graceful way for client code to avoid a PermGen leak).

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

Sidebar

Related Questions

So I have a quartz installation using JDBCJobStore that has multiple tomcat workers. Is
I work on an internal corporate system that has a web front-end using Tomcat.
Tomcat does not encode correctly String literals that contain unicode characters. The problem occurs
I've got this webapp that needs some memory tuning. While I'm already profiling the
I installed Tomcat, and got SOLR version 1.3 working no problem by copying the
I just upgraded from tomcat 6.0.29 to 7.0.25 using native apr. Tomcat has crashed
Fronting tomcat with httpd solves a big problem for us. We can separate httpd
Has anyone got the new jBPM 4.3 web designer installed and working? I am
I've got a client who already has some applications in production and therefore has
I'm running Tomcat 6 on Windows. I've got the Monitor Tomcat system tray icon

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.