Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Stop Jetty and free classloader in perm memory

Hello Aurelien,

   Maybe you can follow bellow directions to narrow which class causes the leak:

   http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
   http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

   I ran into this kind of problem in the past with tomcat, and all I
can say is that this is one of the most trickier and time consuming
issues. Probably it is caused by user code and not by app server code.

Good luck,
JV -- julioviegas.com

On Mon, Dec 7, 2009 at 11:24, Aurélien Pupier
<aurelien.pupier@xxxxxxxxxxxxxx> wrote:
> Hi,
>
> First, sorry for the previous mail which was send prematurely :s
>
> So,
>
> I'm using Jetty 6.
>
> I started the server this way :
> Server server = new
> Server(store.getDefaultInt(ConsolePreferenceConstants.CONSOLE_PORT));
> WebAppContext warWebappContext = new WebAppContext(MyWebApp, MyContextPath);
> warWebappContext.setClassLoader(new WebAppClassLoader(MyClassloader,
> warWebappContext));
> server.addHandler(warWebappContext);
> And then close it this way :
> consoleServer.stop();
> consoleServer.destroy();
>
> But like that the classloader is kept in perm memory (I use a dump of the
> memory to see that)
> As I stop and start an amount of time the server there is a a lot of
> Clasloader in perm memory which is never released.
>
> I tried several things to free them :
> - remove WebAppContext from server handler.
> - stop and destroy WebAppContext
> - destroy the WebAppClassLoader
>
> and call System.gc() after each of these attempts without success in any
> case.
>
> So what is proper way to shutdown the server and free up the memory from
> classloader?
>
> Thanks by advance for any hints.
> Regards,
>
> Aurelien Pupier
>
> PS : I didn't see a jetty forum on Eclipse forum, no one exist?
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>


Back to the top