RE: tomcat memory leak problem
As stated below profiling (Yourkit is a very good recommendation, you can try their early access version http://www.yourkit.com/eap/index.jsp) will give you more insight in your tomcat application. Sometimes changing your memory / garbage collect parameters can change the world for you. For more insight read: http://www.informit.com/guides/content.aspx?g=javaseqNum=253 http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html Hubert -Original Message- From: Piller Sébastien [mailto:pi...@hmcrecord.ch] Sent: 05 February 2009 17:25 To: Tomcat Users List Subject: Re: tomcat memory leak problem Are you sure you don't have any thread or task (I mean, quartz or so) that is running and consume memory? I agree, this sounds quite strange (our app is running for several weeks and don't have any major issue, we sometimes need to restart tomcat because it hangs, but our memory is under control, and we use lotz of external api like spring, hibernate, wicket, etc.) Could you maybe profile it using Yourkit or any other tool? fcxjp a écrit : My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat memory leak problem
My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. -- View this message in context: http://www.nabble.com/tomcat-memory-leak-problem-tp21855110p21855110.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat memory leak problem
Are you sure you don't have any thread or task (I mean, quartz or so) that is running and consume memory? I agree, this sounds quite strange (our app is running for several weeks and don't have any major issue, we sometimes need to restart tomcat because it hangs, but our memory is under control, and we use lotz of external api like spring, hibernate, wicket, etc.) Could you maybe profile it using Yourkit or any other tool? fcxjp a écrit : My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat memory leak problem
The problem may be in your web application and not in Tomcat itself. Duplicate your environment and use a memory profiler. (like the one included with Netbeans) Or use the extended JVM options to produce a HeapDump -Original Message- From: fcxjp [mailto:fc...@163.com] Sent: Thursday, February 05, 2009 11:14 AM To: users@tomcat.apache.org Subject: tomcat memory leak problem My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. -- View this message in context: http://www.nabble.com/tomcat-memory-leak-problem-tp21855110p21855110.htm l Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Any application which is use to detect tomcat memory leak problem
Hi Gurus, Is there any application which I may use to detect tomcat memory leak problem? Thank you in advance for any value input. Thanks Regards. Get your new Email address! Grab the Email name you#39;ve always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/sg/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any application which is use to detect tomcat memory leak problem
Hello Nix Are you looking for a memory leak in your web application or in tomcat? Short answer is it's not easy. The garbage collection mechanism in the JVM will cleanup any objects that are no longer referenced. Therefore, you are only concerned with objects that remain referenced (which in an ideal world should be relatively few). To test if your app is indeed exponentially increasing, you could start the JVM with the -Xverbose:gc option and watch the output for a while. If not, a good (commercial) tool is JProbe http://www.quest.com/jprobe/memory-home.aspx Regards Tom On 23/06/2008, at 12:17 PM, Nix Hanwei wrote: Hi Gurus, Is there any application which I may use to detect tomcat memory leak problem? Thank you in advance for any value input. Thanks Regards. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any application which is use to detect tomcat memory leak problem
One of the things I had done in my past projects was to run a thread which periodically executes the freeMemory /totalMemory methods on Runtime class in JVM, this will at least tell you how the memory is utilised, but pinpointing the leak may need a commercial tool. -Sameer --- On Mon, 6/23/08, Nix Hanwei [EMAIL PROTECTED] wrote: From: Nix Hanwei [EMAIL PROTECTED] Subject: Any application which is use to detect tomcat memory leak problem To: Tomcat Users List users@tomcat.apache.org Date: Monday, June 23, 2008, 9:47 AM Hi Gurus, Is there any application which I may use to detect tomcat memory leak problem? Thank you in advance for any value input. Thanks Regards. Get your new Email address! Grab the Email name you#39;ve always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/sg/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]