I have a similar problem which I gave up trying to diagnose any further as nobody else seemed to have the problem. I'm using Tomcat 5.0.28 and JVM 1.4.2_10 under RedHat 8, 9 and CentOS 4.2 with 1GB RAM. I don't explicitly set any JVM heap parameters.
I have profiled the application using JProfiler and it does not show a leak. It shows the classic saw tooth shape where the heap grows to some limit and then gets garbage collected. Now the interesting thing. The Linux application, as reported by top, grows until all RAM and swap are exhausted but the JVM never reports an out of memory exception. I know there are issues with multi threaded applications and the use of top but, from the Linux kernels point of view, something has used all the memory. Profiling that very same instance of the application shows that all is well with the heap. All I do now is bounce Tomcat every 24 hours as seems to be the general opinion on the list. I am hoping that 5.5 will sort this out but I can't move up just yet. Just my tuppence worth. On 3/7/06, Tim Lucia <[EMAIL PROTECTED]> wrote: > You don't *have* to make it serializable. But if you don't, sessions cannot > be persistent across a Tomcat shutdown, nor can they be replicated in a > clustered environment. The error below is pointing out this fact to you. > > Tim > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 07, 2006 1:34 PM > To: Tomcat Users List > Subject: RE: Tomcat 5.0.28 memory leak > > Why do I have to make my class serializable.It is a simple web application > using the "MemberData" class for storing some data??? > > > |---------+----------------------------> > | | "Tim Lucia" | > | | <[EMAIL PROTECTED]| > | | om> | > | | | > | | 03/07/2006 12:26 | > | | PM | > | | Please respond to| > | | "Tomcat Users | > | | List" | > |---------+----------------------------> > > >--------------------------------------------------------------------------- > ---------------------------------------------------| > | > | > | To: "'Tomcat Users List'" <users@tomcat.apache.org> > | > | cc: > | > | Subject: RE: Tomcat 5.0.28 memory leak > | > > >--------------------------------------------------------------------------- > ---------------------------------------------------| > > > > > The error below is because the class aaa.pm.server.beans.MemberData does not > implement java.io.Serializable. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 07, 2006 1:09 PM > To: Tomcat Users List > Subject: Re: Tomcat 5.0.28 memory leak > > Yes I tried JProbe and during memory debugging I see char[] size going up.If > I look into bug databases there are various reasons.Some talk to > commons-logging others about session persistance. > I am getting the following error in my log4j log for the application.Also I > noticed if I run tomcat as an application it doesn't break though I do have > memory increase slowly but if I start it as service it breaks even with a > few refreshes of the page. > > > [2006-03-07 11:00:39,734] Thread-1 org.apache.catalina.session.ManagerBase > ERROR - IOException while loading persisted sessions: > java.io.WriteAbortedException: writing aborted; > java.io.NotSerializableException: aaa.pm.server.beans.MemberData > java.io.WriteAbortedException: writing aborted; > java.io.NotSerializableException: aaa.pm.server.beans.MemberData > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1268) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) > at java.util.LinkedList.readObject(LinkedList.java:702) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) > at > org.apache.catalina.session.StandardSession.readObject(StandardSession.java: > > 1342) > at > org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j > > ava:885) > at > org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:416) > > at > org.apache.catalina.session.StandardManager.load(StandardManager.java:343) > at > org.apache.catalina.session.StandardManager.start(StandardManager.java:657) > at > org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) > at > org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:3 > > 15) > at > org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: > > 216) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 > > 23) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) > at > org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j > > ava:277) > at > org.apache.catalina.core.StandardHost.install(StandardHost.java:832) > at > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701 > > ) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) > at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) > at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) > at > org.apache.catalina.core.StandardService.start(StandardService.java:480) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) > Caused by: java.io.NotSerializableException: aaa.pm.server.beans.MemberData > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at java.util.LinkedList.writeObject(LinkedList.java:681) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:780) > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294) > at > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245) > > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at > org.apache.catalina.session.StandardSession.writeObject(StandardSession.java > > :1415) > at > org.apache.catalina.session.StandardSession.writeObjectData(StandardSession. > > java:902) > at > org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:53 > > 9) > at > org.apache.catalina.session.StandardManager.unload(StandardManager.java:485) > > at > org.apache.catalina.session.StandardManager.stop(StandardManager.java:687) > at > org.apache.catalina.core.StandardContext.stop(StandardContext.java:4496) > at > org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:952) > at > org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.ja > > va:670) > at > org.apache.catalina.core.StandardHost.remove(StandardHost.java:946) > at > org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1028) > at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1005) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:351) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1123) > at > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1135) > at > org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:483) > at > org.apache.catalina.core.StandardService.stop(StandardService.java:542) > at > org.apache.catalina.core.StandardServer.stop(StandardServer.java:2347) > at org.apache.catalina.startup.Catalina.stop(Catalina.java:605) > at org.apache.catalina.startup.Catalina.start(Catalina.java:580) > ... 6 more > [2006-03-07 11:00:39,781] Thread-1 org.apache.catalina.session.ManagerBase > ERROR - Exception loading sessions from persistent storage > java.io.WriteAbortedException: writing aborted; > java.io.NotSerializableException: aaa.pm.server.beans.MemberData > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1268) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) > at java.util.LinkedList.readObject(LinkedList.java:702) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) > at > org.apache.catalina.session.StandardSession.readObject(StandardSession.java: > > 1342) > at > org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j > > ava:885) > at > org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:416) > > at > org.apache.catalina.session.StandardManager.load(StandardManager.java:343) > at > org.apache.catalina.session.StandardManager.start(StandardManager.java:657) > at > org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) > at > org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:3 > > 15) > at > org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: > > 216) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 > > 23) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) > at > org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j > > ava:277) > at > org.apache.catalina.core.StandardHost.install(StandardHost.java:832) > at > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701 > > ) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) > at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) > at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) > at > org.apache.catalina.core.StandardService.start(StandardService.java:480) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) > Caused by: java.io.NotSerializableException: aaa.pm.server.beans.MemberData > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at java.util.LinkedList.writeObject(LinkedList.java:681) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:780) > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294) > at > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245) > > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at > org.apache.catalina.session.StandardSession.writeObject(StandardSession.java > > :1415) > at > org.apache.catalina.session.StandardSession.writeObjectData(StandardSession. > > java:902) > at > org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:53 > > 9) > at > org.apache.catalina.session.StandardManager.unload(StandardManager.java:485) > > at > org.apache.catalina.session.StandardManager.stop(StandardManager.java:687) > at > org.apache.catalina.core.StandardContext.stop(StandardContext.java:4496) > at > org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:952) > at > org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.ja > > va:670) > at > org.apache.catalina.core.StandardHost.remove(StandardHost.java:946) > at > org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1028) > at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1005) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:351) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor > > t.java:119) > at > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1123) > at > org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1135) > at > org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:483) > at > org.apache.catalina.core.StandardService.stop(StandardService.java:542) > at > org.apache.catalina.core.StandardServer.stop(StandardServer.java:2347) > at org.apache.catalina.startup.Catalina.stop(Catalina.java:605) > at org.apache.catalina.startup.Catalina.start(Catalina.java:580) > ... 6 more > > > |---------+----------------------------> > | | Mark Thomas | > | | <[EMAIL PROTECTED]| > | | > | > | | | > | | 03/07/2006 12:02 | > | | PM | > | | Please respond to| > | | "Tomcat Users | > | | List" | > |---------+----------------------------> > > >----------------------------------------------------------------------- > >---- > > ---------------------------------------------------| > | > | > | To: Tomcat Users List <users@tomcat.apache.org> > | > | cc: > | > | Subject: Re: Tomcat 5.0.28 memory leak > | > > >----------------------------------------------------------------------- > >---- > > ---------------------------------------------------| > > > > > [EMAIL PROTECTED] wrote: > > Hello All, > > > > I posted this question before.I am using tomcat5.0.28 somehow my > > application blows the service with memory increasing really quicly > > even with one user. > > If I test same on tomcat 4.1.24 it runs fine. > > Any known leaks with this version ???I think tomcat 5.0 has problems.I > have > > read issues about the bug with logging mechanism.I tried the > > workarounds but no luck:( > > Have you tried profiling your application? > > Mark > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]