How to clear PermGen in tomcat without restart












1















I want to clear PermGen memory in tomcat without restarting tomcat.

How can do this activity? I get:




PermGen: OutOfMemoryError




My problem is that I don't want to shut down tomcat.










share|improve this question




















  • 1





    I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

    – Thomas
    Nov 22 '18 at 14:52













  • I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

    – Sheetal Mohan Sharma
    Nov 22 '18 at 15:25











  • My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

    – ErenSalman
    Nov 22 '18 at 15:27











  • Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

    – Eugène Adell
    Nov 22 '18 at 15:33






  • 1





    When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

    – Selaron
    Nov 22 '18 at 15:50
















1















I want to clear PermGen memory in tomcat without restarting tomcat.

How can do this activity? I get:




PermGen: OutOfMemoryError




My problem is that I don't want to shut down tomcat.










share|improve this question




















  • 1





    I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

    – Thomas
    Nov 22 '18 at 14:52













  • I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

    – Sheetal Mohan Sharma
    Nov 22 '18 at 15:25











  • My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

    – ErenSalman
    Nov 22 '18 at 15:27











  • Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

    – Eugène Adell
    Nov 22 '18 at 15:33






  • 1





    When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

    – Selaron
    Nov 22 '18 at 15:50














1












1








1


1






I want to clear PermGen memory in tomcat without restarting tomcat.

How can do this activity? I get:




PermGen: OutOfMemoryError




My problem is that I don't want to shut down tomcat.










share|improve this question
















I want to clear PermGen memory in tomcat without restarting tomcat.

How can do this activity? I get:




PermGen: OutOfMemoryError




My problem is that I don't want to shut down tomcat.







java tomcat permgen






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 16:35









Green

677426




677426










asked Nov 22 '18 at 14:49









ErenSalmanErenSalman

61




61








  • 1





    I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

    – Thomas
    Nov 22 '18 at 14:52













  • I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

    – Sheetal Mohan Sharma
    Nov 22 '18 at 15:25











  • My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

    – ErenSalman
    Nov 22 '18 at 15:27











  • Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

    – Eugène Adell
    Nov 22 '18 at 15:33






  • 1





    When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

    – Selaron
    Nov 22 '18 at 15:50














  • 1





    I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

    – Thomas
    Nov 22 '18 at 14:52













  • I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

    – Sheetal Mohan Sharma
    Nov 22 '18 at 15:25











  • My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

    – ErenSalman
    Nov 22 '18 at 15:27











  • Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

    – Eugène Adell
    Nov 22 '18 at 15:33






  • 1





    When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

    – Selaron
    Nov 22 '18 at 15:50








1




1





I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

– Thomas
Nov 22 '18 at 14:52







I'm not sure this is even possible (or at least not easy). This problem already exists for quite a while and if it were easy to solve without a restart it probably would be part of Tomcat - at least in the form of some documentation.

– Thomas
Nov 22 '18 at 14:52















I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

– Sheetal Mohan Sharma
Nov 22 '18 at 15:25





I would say why and you should not instead fix the root cause. Increase the heap settings and then see if that helps. Check this thread stackoverflow.com/questions/10085028/…

– Sheetal Mohan Sharma
Nov 22 '18 at 15:25













My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

– ErenSalman
Nov 22 '18 at 15:27





My main purpose is to do deployment with downtime zero. When i searched this topic, i found "paralel deployment" in tomcat. But after a while tomcat's memory (also permGen) is increased. Because i do not restart during deployment. So i want to find a way to stop or clear increased memory.

– ErenSalman
Nov 22 '18 at 15:27













Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

– Eugène Adell
Nov 22 '18 at 15:33





Which Tomcat version are you using ? If old, maybe it's necessary to upgrade since some issues were corrected that could help you.

– Eugène Adell
Nov 22 '18 at 15:33




1




1





When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

– Selaron
Nov 22 '18 at 15:50





When you undeploy the old version of your app, do you get warnings about potential leak issues? On successful full undeployment of an app tomcat should be able to garbage collect that apps' WebAppClassLoader and thus free the permgen from classes. If there is a Thread or ThreadLocale left on your app, undeployment won't fully succeed and your permGen will fill which each start/stop of your app.

– Selaron
Nov 22 '18 at 15:50












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433445%2fhow-to-clear-permgen-in-tomcat-without-restart%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433445%2fhow-to-clear-permgen-in-tomcat-without-restart%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen