RE: Memory Leak with static content
Howdy, >RESPONSE: Yeah, that's what I want for now. I want to see what happens >when >the garbage collector is called normally. Don't forget to enable verbose GC. >On a side note, I just called System.gc() manually and it only cleared a >couple hundred bytes. I will try later though, as it hasn't been long >since last restart. Clearing only a couple of hundred bytes suggest the memory is used and references held, making it less likely to be a pure memory leak. As an aside, System.gc() is just a suggestion to the VM. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
>These settings suggest a minimum heap of 60MB, and a maximum heap of >80m. Is that the behavior you want? RESPONSE: Yeah, that's what I want for now. I want to see what happens when the garbage collector is called normally. On a side note, I just called System.gc() manually and it only cleared a couple hundred bytes. I will try later though, as it hasn't been long since last restart. - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 3:04 PM Subject: RE: Memory Leak with static content > > Howdy, > > >> You realize these numbers are meaningless to anyone except you, as we > >> don't know what you're measuring, how you're measuring it, what the > >> proper results / proper behavior is, etc. > >No, I didn't realize my numbers meant nothing. I figured them to be > >self-explanatory. The numbers supplied were there simply as evidence > of > >the > >incremental increase of memory over time. That's all. I apologize for > any > >confusion. > > I was unclear -- they're not evidence of anything until you explain how > they're measured and what you would expect to see under "normal" > conditions (or alternatively show the numbers from Solaris and Linux > side by side, allowing space for JVM implementation variability). > > >Actually, I didn't reset them after the upgrade to Tomcat 4.1.27. I > just > >changed them to -Xms60m -Xmx80m. > > These settings suggest a minimum heap of 60MB, and a maximum heap of > 80m. Is that the behavior you want? > > Yoav Shapira > > > > This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. > > > - > 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]
RE: Memory Leak with static content
Howdy, >> You realize these numbers are meaningless to anyone except you, as we >> don't know what you're measuring, how you're measuring it, what the >> proper results / proper behavior is, etc. >No, I didn't realize my numbers meant nothing. I figured them to be >self-explanatory. The numbers supplied were there simply as evidence of >the >incremental increase of memory over time. That's all. I apologize for any >confusion. I was unclear -- they're not evidence of anything until you explain how they're measured and what you would expect to see under "normal" conditions (or alternatively show the numbers from Solaris and Linux side by side, allowing space for JVM implementation variability). >Actually, I didn't reset them after the upgrade to Tomcat 4.1.27. I just >changed them to -Xms60m -Xmx80m. These settings suggest a minimum heap of 60MB, and a maximum heap of 80m. Is that the behavior you want? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
> You realize these numbers are meaningless to anyone except you, as we > don't know what you're measuring, how you're measuring it, what the > proper results / proper behavior is, etc. No, I didn't realize my numbers meant nothing. I figured them to be self-explanatory. The numbers supplied were there simply as evidence of the incremental increase of memory over time. That's all. I apologize for any confusion. > One thing worth investigating is the GC settings. What are they right > now? Actually, I didn't reset them after the upgrade to Tomcat 4.1.27. I just changed them to -Xms60m -Xmx80m. I'll change these numbers after I'm done babysitting the server, but I'd like to see what happens once the limit is reached. -Seth. - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 2:17 PM Subject: RE: Memory Leak with static content > > Howdy, > > >Here's what's happened on the server since 12:40 today > > > >Virtual Size: 112592 > >Real Size: 61880 > >Time Up(days-hours:minutes:seconds): 01:05:20 > > > You realize these numbers are meaningless to anyone except you, as we > don't know what you're measuring, how you're measuring it, what the > proper results / proper behavior is, etc. > > >This is an example of what's happening. The memory it is using > increases, > >yet never decreases. I'm able to run more processes on another server > of > >ours under Linux, and the memory never increases over 60MB. > > On tomcat on Linux, you mean? If so, wouldn't that conclude that the > problem is in the OS, not in Tomcat or your code? You're using the same > JVM version on Solaris and Linux, right? > > One thing worth investigating is the GC settings. What are they right > now? > > Yoav Shapira > > > > > This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. > > > - > 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]
RE: Memory Leak with static content
Howdy, >Here's what's happened on the server since 12:40 today > >Virtual Size: 112592 >Real Size: 61880 >Time Up(days-hours:minutes:seconds): 01:05:20 You realize these numbers are meaningless to anyone except you, as we don't know what you're measuring, how you're measuring it, what the proper results / proper behavior is, etc. >This is an example of what's happening. The memory it is using increases, >yet never decreases. I'm able to run more processes on another server of >ours under Linux, and the memory never increases over 60MB. On tomcat on Linux, you mean? If so, wouldn't that conclude that the problem is in the OS, not in Tomcat or your code? You're using the same JVM version on Solaris and Linux, right? One thing worth investigating is the GC settings. What are they right now? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
Here's what's happened on the server since 12:40 today Virtual Size: 112592 Real Size: 61880 Time Up(days-hours:minutes:seconds): 01:05:20 Virtual Size: 112592 Real Size: 62288 Time Up(days-hours:minutes:seconds): 01:15:20 Virtual Size: 112592 Real Size: 64376 Time Up(days-hours:minutes:seconds): 01:25:20 Virtual Size: 140976 Real Size: 76688 Time Up(days-hours:minutes:seconds): 01:35:21 Virtual Size: 142048 Real Size: 78824 Time Up(days-hours:minutes:seconds): 01:45:20 Virtual Size: 142048 Real Size: 78976 Time Up(days-hours:minutes:seconds): 01:55:20 Virtual Size: 142056 Real Size: 79000 Time Up(days-hours:minutes:seconds): 02:05:20 Virtual Size: 142056 Real Size: 79240 Time Up(days-hours:minutes:seconds): 02:15:20 Virtual Size: 142056 Real Size: 79624 Time Up(days-hours:minutes:seconds): 02:25:21 Virtual Size: 142056 Real Size: 80400 Time Up(days-hours:minutes:seconds): 02:35:20 This is an example of what's happening. The memory it is using increases, yet never decreases. I'm able to run more processes on another server of ours under Linux, and the memory never increases over 60MB. -Seth. - Original Message - From: "Seth Newton" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 2:01 PM Subject: Re: Memory Leak with static content > Yoav, > > Thanks for the response. I've used what you've suggested in the past on > development servers, but I'm saving your suggestion for a last ditch > possibility. The length of time to install a profiler and re-familiarize > myself with its use is something I'd like to skip. On top of that, this is > a production server and I wouldn't want to run a profiler and stress it out > ;). > > I'm trying hard to stand behind the jakarta community here, because I've > gotten some good use out of Tomcat in the past. I'm even taking heat from > fellow developers for using Tomcat on a production server, but I think it > can be done. I'll wait and see if there are any more suggestions, and then > I'll either decide to trudge ahead with OptimizeIt or just change java > servers. > > -Seth. > - Original Message - > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, September 15, 2003 1:40 PM > Subject: RE: Memory Leak with static content > > > > > > Howdy, > > Run your app with a profiler and a stress tool and see when and where > > memory is allocated. > > > > Yoav Shapira > > Millennium ChemInformatics > > > > > > >-Original Message- > > >From: Seth Newton [mailto:[EMAIL PROTECTED] > > >Sent: Monday, September 15, 2003 1:34 PM > > >To: Tomcat Users List > > >Subject: Re: Memory Leak with static content > > > > > >All, > > > > > >Updates to this issue > > > > > >-I'm not sure if it's the OS, but I've never seen this happen before on > > >other Solaris installs. What would I look at to determine if it's the > > >OS?.. > > >The way that question is phrased makes it difficult for me to > > completely > > >understand what you mean. Can you be more specific? > > >-It did take up memory until Tomcat would no longer serve pages. Users > > >would try to see their sites and just get a blank white screen until > > their > > >request timed out. I haven't let it time go incrementally since I've > > >upgraded Tomcat or the jdk, however, I may let it stall out if I get > > that > > >desperate. > > >-I upgraded to 1.4.2 and still the memory increases. > > >-Yes, I'm closing all streams in the email class. Also, this > > particular > > >code has been used successfully across platforms and across java > > servers > > >for > > >about 3 years now. > > > > > >Anymore input is greatly appreciated. > > > > > >-Seth. > > >- Original Message - > > >From: "Nikolaos Giannopoulos" <[EMAIL PROTECTED]> > > >To: "Tomcat Users List" <[EMAIL PROTECTED]> > > >Sent: Friday, September 12, 2003 6:04 PM > > >Subject: RE: Memory Leak with static content > > > > > > > > >> Seth, > > >> > > >> Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak > > in > > >the > > >> StringBuffer implementation w.r.t. re-using StringBuffers but you > > mention > > >> that your only serving static content so this
RE: Memory Leak with static content
Howdy, I assumed you had a test server that mimic your production setup -- I wasn't suggested you run with a profiler on a production server, as the slowdown is unbearable usually ;) Make sure the server in question has all the required Solaris OS patches for the JDK version you're using. We forgot to do that a couple of times and had unstable behavior. Other than that, I concur with what Senor Giannopoulos said: we've seen no problems running tomcat with JDK 1.4.2 on Solaris 8 in production for heavy traffic sites with lots of static (and dynamic) content. In fact, we moved from $$$ servers to tomcat and have been exceedingly happy with the results. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Seth Newton [mailto:[EMAIL PROTECTED] >Sent: Monday, September 15, 2003 2:01 PM >To: Tomcat Users List >Subject: Re: Memory Leak with static content > >Yoav, > >Thanks for the response. I've used what you've suggested in the past on >development servers, but I'm saving your suggestion for a last ditch >possibility. The length of time to install a profiler and re-familiarize >myself with its use is something I'd like to skip. On top of that, this is >a production server and I wouldn't want to run a profiler and stress it out >;). > >I'm trying hard to stand behind the jakarta community here, because I've >gotten some good use out of Tomcat in the past. I'm even taking heat from >fellow developers for using Tomcat on a production server, but I think it >can be done. I'll wait and see if there are any more suggestions, and then >I'll either decide to trudge ahead with OptimizeIt or just change java >servers. > >-Seth. >- Original Message - >From: "Shapira, Yoav" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Monday, September 15, 2003 1:40 PM >Subject: RE: Memory Leak with static content > > >> >> Howdy, >> Run your app with a profiler and a stress tool and see when and where >> memory is allocated. >> >> Yoav Shapira >> Millennium ChemInformatics >> >> >> >-Original Message- >> >From: Seth Newton [mailto:[EMAIL PROTECTED] >> >Sent: Monday, September 15, 2003 1:34 PM >> >To: Tomcat Users List >> >Subject: Re: Memory Leak with static content >> > >> >All, >> > >> >Updates to this issue >> > >> >-I'm not sure if it's the OS, but I've never seen this happen before on >> >other Solaris installs. What would I look at to determine if it's the >> >OS?.. >> >The way that question is phrased makes it difficult for me to >> completely >> >understand what you mean. Can you be more specific? >> >-It did take up memory until Tomcat would no longer serve pages. Users >> >would try to see their sites and just get a blank white screen until >> their >> >request timed out. I haven't let it time go incrementally since I've >> >upgraded Tomcat or the jdk, however, I may let it stall out if I get >> that >> >desperate. >> >-I upgraded to 1.4.2 and still the memory increases. >> >-Yes, I'm closing all streams in the email class. Also, this >> particular >> >code has been used successfully across platforms and across java >> servers >> >for >> >about 3 years now. >> > >> >Anymore input is greatly appreciated. >> > >> >-Seth. >> >- Original Message - >> >From: "Nikolaos Giannopoulos" <[EMAIL PROTECTED]> >> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >> >Sent: Friday, September 12, 2003 6:04 PM >> >Subject: RE: Memory Leak with static content >> > >> > >> >> Seth, >> >> >> >> Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak >> in >> >the >> >> StringBuffer implementation w.r.t. re-using StringBuffers but you >> mention >> >> that your only serving static content so this may not be it. >> >> >> >> However, I believe that I read that something like 2000 bugs have >> been >> >fixed >> >> in 1.4.2 (if my memory serves me well). We have have no visible >> problems >> >> running tomcat 4.1.12/18 stand alone w/ 1.4.2 on Solaris 8 on 4 boxes >> (no >> >> JSPs - just servlets and static content). >> >> >> >> Please reply back if this works or does not work for you - we are >> looking &g
Re: Memory Leak with static content
Yoav, Thanks for the response. I've used what you've suggested in the past on development servers, but I'm saving your suggestion for a last ditch possibility. The length of time to install a profiler and re-familiarize myself with its use is something I'd like to skip. On top of that, this is a production server and I wouldn't want to run a profiler and stress it out ;). I'm trying hard to stand behind the jakarta community here, because I've gotten some good use out of Tomcat in the past. I'm even taking heat from fellow developers for using Tomcat on a production server, but I think it can be done. I'll wait and see if there are any more suggestions, and then I'll either decide to trudge ahead with OptimizeIt or just change java servers. -Seth. - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 1:40 PM Subject: RE: Memory Leak with static content > > Howdy, > Run your app with a profiler and a stress tool and see when and where > memory is allocated. > > Yoav Shapira > Millennium ChemInformatics > > > >-Original Message- > >From: Seth Newton [mailto:[EMAIL PROTECTED] > >Sent: Monday, September 15, 2003 1:34 PM > >To: Tomcat Users List > >Subject: Re: Memory Leak with static content > > > >All, > > > >Updates to this issue > > > >-I'm not sure if it's the OS, but I've never seen this happen before on > >other Solaris installs. What would I look at to determine if it's the > >OS?.. > >The way that question is phrased makes it difficult for me to > completely > >understand what you mean. Can you be more specific? > >-It did take up memory until Tomcat would no longer serve pages. Users > >would try to see their sites and just get a blank white screen until > their > >request timed out. I haven't let it time go incrementally since I've > >upgraded Tomcat or the jdk, however, I may let it stall out if I get > that > >desperate. > >-I upgraded to 1.4.2 and still the memory increases. > >-Yes, I'm closing all streams in the email class. Also, this > particular > >code has been used successfully across platforms and across java > servers > >for > >about 3 years now. > > > >Anymore input is greatly appreciated. > > > >-Seth. > >- Original Message - > >From: "Nikolaos Giannopoulos" <[EMAIL PROTECTED]> > >To: "Tomcat Users List" <[EMAIL PROTECTED]> > >Sent: Friday, September 12, 2003 6:04 PM > >Subject: RE: Memory Leak with static content > > > > > >> Seth, > >> > >> Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak > in > >the > >> StringBuffer implementation w.r.t. re-using StringBuffers but you > mention > >> that your only serving static content so this may not be it. > >> > >> However, I believe that I read that something like 2000 bugs have > been > >fixed > >> in 1.4.2 (if my memory serves me well). We have have no visible > problems > >> running tomcat 4.1.12/18 stand alone w/ 1.4.2 on Solaris 8 on 4 boxes > (no > >> JSPs - just servlets and static content). > >> > >> Please reply back if this works or does not work for you - we are > looking > >at > >> upgrading our Tomcat instances in the near future. > >> > >> HTH. > >> > >> --Nikolaos > >> > >> > >> > -Original Message- > >> > From: Seth Newton [mailto:[EMAIL PROTECTED] > >> > Sent: Friday, September 12, 2003 4:58 PM > >> > To: [EMAIL PROTECTED] > >> > Subject: Memory Leak with static content > >> > > >> > > >> > All, > >> > > >> > OS: Sparc-Solaris 9 > >> > JDK: 1.4.0_02 > >> > Tomcat: 4.1.27 > >> > > >> > Problem: > >> > I start tomcat and it takes up about 45MB of RAM. I wrote a > >> > script to email me every ten minutes the amount of memory it's > >> > taking up. The results are showing me that it gains about 1MB > >> > every 10 minutes or so (on average). If I let it go, it will > >> > grow until it runs out of memory. Right now, I have a script to > >> > restart tomcat after the memory is too high. This is a bad > >> > solution. I
RE: Memory Leak with static content
Howdy, Run your app with a profiler and a stress tool and see when and where memory is allocated. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Seth Newton [mailto:[EMAIL PROTECTED] >Sent: Monday, September 15, 2003 1:34 PM >To: Tomcat Users List >Subject: Re: Memory Leak with static content > >All, > >Updates to this issue > >-I'm not sure if it's the OS, but I've never seen this happen before on >other Solaris installs. What would I look at to determine if it's the >OS?.. >The way that question is phrased makes it difficult for me to completely >understand what you mean. Can you be more specific? >-It did take up memory until Tomcat would no longer serve pages. Users >would try to see their sites and just get a blank white screen until their >request timed out. I haven't let it time go incrementally since I've >upgraded Tomcat or the jdk, however, I may let it stall out if I get that >desperate. >-I upgraded to 1.4.2 and still the memory increases. >-Yes, I'm closing all streams in the email class. Also, this particular >code has been used successfully across platforms and across java servers >for >about 3 years now. > >Anymore input is greatly appreciated. > >-Seth. >- Original Message - >From: "Nikolaos Giannopoulos" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Friday, September 12, 2003 6:04 PM >Subject: RE: Memory Leak with static content > > >> Seth, >> >> Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak in >the >> StringBuffer implementation w.r.t. re-using StringBuffers but you mention >> that your only serving static content so this may not be it. >> >> However, I believe that I read that something like 2000 bugs have been >fixed >> in 1.4.2 (if my memory serves me well). We have have no visible problems >> running tomcat 4.1.12/18 stand alone w/ 1.4.2 on Solaris 8 on 4 boxes (no >> JSPs - just servlets and static content). >> >> Please reply back if this works or does not work for you - we are looking >at >> upgrading our Tomcat instances in the near future. >> >> HTH. >> >> --Nikolaos >> >> >> > -Original Message- >> > From: Seth Newton [mailto:[EMAIL PROTECTED] >> > Sent: Friday, September 12, 2003 4:58 PM >> > To: [EMAIL PROTECTED] >> > Subject: Memory Leak with static content >> > >> > >> > All, >> > >> > OS: Sparc-Solaris 9 >> > JDK: 1.4.0_02 >> > Tomcat: 4.1.27 >> > >> > Problem: >> > I start tomcat and it takes up about 45MB of RAM. I wrote a >> > script to email me every ten minutes the amount of memory it's >> > taking up. The results are showing me that it gains about 1MB >> > every 10 minutes or so (on average). If I let it go, it will >> > grow until it runs out of memory. Right now, I have a script to >> > restart tomcat after the memory is too high. This is a bad >> > solution. I've looked at a LOT of people's suggestions from >> > other threads, and I have tried the following: >> > >> > -Use jikes >> > -Set development to false in web.xml >> > -Increase the heap sizes >> > -set fork to true in web.xml >> > >> > Other Info: >> > -I'm using Tomcat to feed about 6 sites with static content. I >> > have one jsp page that handles all of our forms, and all that >> > does is capture the and send it to an email address. It >> > is the only code I have anywhere. This jsp page is not causing >> > the memory leak. >> > -I had the same problem with 4.1.17, and was hoping that an >> > update would help, but it didn't. >> > -This is an incremental increase, and doesn't seem to have much >> > to do with traffic patterns or how much I use my one jsp page. >> > >> > Any suggestions would be great. >> > -Seth. >> >> >> >> - >> 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
All, Updates to this issue -I'm not sure if it's the OS, but I've never seen this happen before on other Solaris installs. What would I look at to determine if it's the OS?.. The way that question is phrased makes it difficult for me to completely understand what you mean. Can you be more specific? -It did take up memory until Tomcat would no longer serve pages. Users would try to see their sites and just get a blank white screen until their request timed out. I haven't let it time go incrementally since I've upgraded Tomcat or the jdk, however, I may let it stall out if I get that desperate. -I upgraded to 1.4.2 and still the memory increases. -Yes, I'm closing all streams in the email class. Also, this particular code has been used successfully across platforms and across java servers for about 3 years now. Anymore input is greatly appreciated. -Seth. - Original Message - From: "Nikolaos Giannopoulos" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Friday, September 12, 2003 6:04 PM Subject: RE: Memory Leak with static content > Seth, > > Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak in the > StringBuffer implementation w.r.t. re-using StringBuffers but you mention > that your only serving static content so this may not be it. > > However, I believe that I read that something like 2000 bugs have been fixed > in 1.4.2 (if my memory serves me well). We have have no visible problems > running tomcat 4.1.12/18 stand alone w/ 1.4.2 on Solaris 8 on 4 boxes (no > JSPs - just servlets and static content). > > Please reply back if this works or does not work for you - we are looking at > upgrading our Tomcat instances in the near future. > > HTH. > > --Nikolaos > > > > -Original Message- > > From: Seth Newton [mailto:[EMAIL PROTECTED] > > Sent: Friday, September 12, 2003 4:58 PM > > To: [EMAIL PROTECTED] > > Subject: Memory Leak with static content > > > > > > All, > > > > OS: Sparc-Solaris 9 > > JDK: 1.4.0_02 > > Tomcat: 4.1.27 > > > > Problem: > > I start tomcat and it takes up about 45MB of RAM. I wrote a > > script to email me every ten minutes the amount of memory it's > > taking up. The results are showing me that it gains about 1MB > > every 10 minutes or so (on average). If I let it go, it will > > grow until it runs out of memory. Right now, I have a script to > > restart tomcat after the memory is too high. This is a bad > > solution. I've looked at a LOT of people's suggestions from > > other threads, and I have tried the following: > > > > -Use jikes > > -Set development to false in web.xml > > -Increase the heap sizes > > -set fork to true in web.xml > > > > Other Info: > > -I'm using Tomcat to feed about 6 sites with static content. I > > have one jsp page that handles all of our forms, and all that > > does is capture the and send it to an email address. It > > is the only code I have anywhere. This jsp page is not causing > > the memory leak. > > -I had the same problem with 4.1.17, and was hoping that an > > update would help, but it didn't. > > -This is an incremental increase, and doesn't seem to have much > > to do with traffic patterns or how much I use my one jsp page. > > > > Any suggestions would be great. > > -Seth. > > > > - > 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]
Re: Memory Leak with static content
Hello Seth! SN> All, SN> OS: Sparc-Solaris 9 SN> JDK: 1.4.0_02 SN> Tomcat: 4.1.27 SN> Problem: SN> I start tomcat and it takes up about 45MB of RAM. I wrote a script to email me every ten minutes the amount of memory it's taking up. The results are showing me that it gains about 1MB every 10 SN> minutes or so (on average). If I let it go, it will grow until it runs out of memory. You really get an OutOfMemoryException? I would expect that memory consumption would grow and grow untill it reaches something near the allowed maximum and then garbage collection would break in and free some of already allocated memory. (Of couse it won't give it back to the OS, but it will be free for processing further requests by Tomcat itself) In other words I would expect that memory consumption would stabilize somewhere near the allowed maximum. Does this happen? Or do Tomcat threads really die with an OutOfMemoryException? Anton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
Seth, As you mentioned taht the jsp page is not the problem I hope that you have looked to make sure that you are closing off any input/ouput streams and other resources involved in sending the email right? James Seth Newton wrote: -I'm using Tomcat to feed about 6 sites with static content. I have one jsp page that handles all of our forms, and all that does is capture the and send it to an email address. It is the only code I have anywhere. This jsp page is not causing the memory leak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Leak with static content
Seth, Have you tried JDK 1.4.2? 1.4.0 has been known to have a memory leak in the StringBuffer implementation w.r.t. re-using StringBuffers but you mention that your only serving static content so this may not be it. However, I believe that I read that something like 2000 bugs have been fixed in 1.4.2 (if my memory serves me well). We have have no visible problems running tomcat 4.1.12/18 stand alone w/ 1.4.2 on Solaris 8 on 4 boxes (no JSPs - just servlets and static content). Please reply back if this works or does not work for you - we are looking at upgrading our Tomcat instances in the near future. HTH. --Nikolaos > -Original Message- > From: Seth Newton [mailto:[EMAIL PROTECTED] > Sent: Friday, September 12, 2003 4:58 PM > To: [EMAIL PROTECTED] > Subject: Memory Leak with static content > > > All, > > OS: Sparc-Solaris 9 > JDK: 1.4.0_02 > Tomcat: 4.1.27 > > Problem: > I start tomcat and it takes up about 45MB of RAM. I wrote a > script to email me every ten minutes the amount of memory it's > taking up. The results are showing me that it gains about 1MB > every 10 minutes or so (on average). If I let it go, it will > grow until it runs out of memory. Right now, I have a script to > restart tomcat after the memory is too high. This is a bad > solution. I've looked at a LOT of people's suggestions from > other threads, and I have tried the following: > > -Use jikes > -Set development to false in web.xml > -Increase the heap sizes > -set fork to true in web.xml > > Other Info: > -I'm using Tomcat to feed about 6 sites with static content. I > have one jsp page that handles all of our forms, and all that > does is capture the and send it to an email address. It > is the only code I have anywhere. This jsp page is not causing > the memory leak. > -I had the same problem with 4.1.17, and was hoping that an > update would help, but it didn't. > -This is an incremental increase, and doesn't seem to have much > to do with traffic patterns or how much I use my one jsp page. > > Any suggestions would be great. > -Seth. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with static content
you sure it is not the operating system itself. - Original Message - From: "Seth Newton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 12, 2003 4:57 PM Subject: Memory Leak with static content All, OS: Sparc-Solaris 9 JDK: 1.4.0_02 Tomcat: 4.1.27 Problem: I start tomcat and it takes up about 45MB of RAM. I wrote a script to email me every ten minutes the amount of memory it's taking up. The results are showing me that it gains about 1MB every 10 minutes or so (on average). If I let it go, it will grow until it runs out of memory. Right now, I have a script to restart tomcat after the memory is too high. This is a bad solution. I've looked at a LOT of people's suggestions from other threads, and I have tried the following: -Use jikes -Set development to false in web.xml -Increase the heap sizes -set fork to true in web.xml Other Info: -I'm using Tomcat to feed about 6 sites with static content. I have one jsp page that handles all of our forms, and all that does is capture the and send it to an email address. It is the only code I have anywhere. This jsp page is not causing the memory leak. -I had the same problem with 4.1.17, and was hoping that an update would help, but it didn't. -This is an incremental increase, and doesn't seem to have much to do with traffic patterns or how much I use my one jsp page. Any suggestions would be great. -Seth. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]