Re: Need some Tomcat Configuration help badly
Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some Tomcat Configuration help badly
Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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: Need some Tomcat Configuration help badly
Hi, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Another thing I'm not sure I understand is this: If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some Tomcat Configuration help badly
Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] - 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: Need some Tomcat Configuration help badly
Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some Tomcat Configuration help badly
Howdy, Sure, here's one example: void someMethod() { // MyJob implements Runnable Thread myJobThread = new Thread(new MyJob()); boolean goAhead = evaluateSomeCondition(); if(goAhead) { myJobThread.start(); } else { System.out.println(Not running job.); } } Because creating a thread allocates some resources and adds a reference to the thread in its parent ThreadGroup, when the method is done the Thread cannot be garbage-collected even though the myJobThread reference is gone. A simple fix might be to do the thread creation inside the goAhead clause. This is only to show it's possible. Obviously this is not an example of good practice, but it's an easy enough mistake to make ;) The above is an implementation of an example mentioned on this thread: http://forum.java.sun.com/thread.jsp?forum=4thread=456545message=20839 57. There are others... Yoav Shapira Millennium ChemInformatics -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:38 PM To: Tomcat Users List Subject: RE: Need some Tomcat Configuration help badly Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Need some Tomcat Configuration help badly
Thanks for the clarification. This seems reasonable, as I thought it would be unlikely in most circumstances. Not properly closing/de-referencing external resources, including threads would cause the JVM's memory to grow. JDBC resources would probably be the most common. Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Sure, here's one example: void someMethod() { // MyJob implements Runnable Thread myJobThread = new Thread(new MyJob()); boolean goAhead = evaluateSomeCondition(); if(goAhead) { myJobThread.start(); } else { System.out.println(Not running job.); } } Because creating a thread allocates some resources and adds a reference to the thread in its parent ThreadGroup, when the method is done the Thread cannot be garbage-collected even though the myJobThread reference is gone. A simple fix might be to do the thread creation inside the goAhead clause. This is only to show it's possible. Obviously this is not an example of good practice, but it's an easy enough mistake to make ;) The above is an implementation of an example mentioned on this thread: http://forum.java.sun.com/thread.jsp?forum=4thread=456545message=20839 57. There are others... Yoav Shapira Millennium ChemInformatics -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:38 PM To: Tomcat Users List Subject: RE: Need some Tomcat Configuration help badly Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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
Re: Need some Tomcat Configuration help badly
: I had the same question. In all of the years I've worked with Java I've : always thought it was free of memory leaks. This is a touchy topic, because a lot of it comes down to semantics: Java frees the developer of explicitly destroying objects. This is key in Java because your code only handles references, not true objects, so you can't rely on something going out of scope to cause it to be destroyed. A simplified picture: Java's GC pretty much relies on an object having no live references (connections) to it to determine whether to reap it. So it's entirely possible to create a memory leak in Java if your code manages to maintain reference to an object that's no longer needed or being used, because said object will never be reaped. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some Tomcat Configuration help badly
Hi, How do I turn the fork to be true? Regards, Yuval Zantkeren This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Sunday, December 14, 2003 3:39 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Hi! Dick Steflik wrote: I'm on W2000, just for the record. With this in mind which way should the fork be set; true ot false. Concidering that this poor excuse for an OS does not even know the meaning of fork(), I'd say you set it to true. W2K should then start a completely new process from scratch. You'll loose some performance of course, since starting the JVM takes time and ressources, but if you don't compile many, many jsps at a time, that should not be too much of a problem. Phil P.S.: No pun intended here ;-) - 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: Need some Tomcat Configuration help badly
Hi! Find the default web.xml in $CATALINA_HOME/conf and change the appropriate parameter for the jsp servlet to true. At least in Tomcat5 this file comes with very good documentation. Philipp Taprogge Hi, How do I turn the fork to be true? Regards, Yuval Zantkeren This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Sunday, December 14, 2003 3:39 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Hi! Dick Steflik wrote: I'm on W2000, just for the record. With this in mind which way should the fork be set; true ot false. Concidering that this poor excuse for an OS does not even know the meaning of fork(), I'd say you set it to true. W2K should then start a completely new process from scratch. You'll loose some performance of course, since starting the JVM takes time and ressources, but if you don't compile many, many jsps at a time, that should not be too much of a problem. Phil P.S.: No pun intended here ;-) - 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]
Re: Need some Tomcat Configuration help badly
BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? True for both. It strikes me odd, I've been hearing about memory leak while recompiling JSPs for a couple of years. Is it really there and is it going to be removed in the near future? I recall that being attributed to javac memory leaks. That's why they advise to pre-compile JSP for production environment. I cannot fathom how can it be: a) so consistent b) not dependant on JDK version Any insight? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? Dick Steflik Nikola Milutinovic wrote: BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? True for both. It strikes me odd, I've been hearing about memory leak while recompiling JSPs for a couple of years. Is it really there and is it going to be removed in the near future? I recall that being attributed to javac memory leaks. That's why they advise to pre-compile JSP for production environment. I cannot fathom how can it be: a) so consistent b) not dependant on JDK version Any insight? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Hi! Dick Steflik wrote: If you use a different compiler does the problem go away. I think so. I often hear that using jikes instead of javac would get rid of the problem, which, if true, rises the question why tomcat does not use jikes by default... Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? Which bug are you talking about, the classloader reload memory leak or the javac memory leak? The latter, they probably just fork javac by default. The former, well, I'd like to see whether or not they do suffer from that issue or not! -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Philipp Taprogge wrote: Dick Steflik wrote: If you use a different compiler does the problem go away. I think so. I often hear that using jikes instead of javac would get rid of the problem, which, if true, rises the question why tomcat does not use jikes by default... Because jikes isn't as stable as javac, and not everyone wants to install jikes on their server. It's easy enough to get it going yourself, and it certainly compiles JSPs a LOT faster than javac does. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Is your problem solved. I have noted one thing about Tomcat. If the compiled classes modification date is less than that of the machine running Tomcat, Tomcat will never know that the file is changed and never reload it. Only a reload can load the new class. This is true for servlets,beans nad JSP. I faced this problem when workstation machine time is behind server time. You can overcome this by syncing all machines clocks. Or advise students to perform a reload through the manager task. Or write an Ant script to reload it. rgds Antony Paul. - Original Message - From: Dick Steflik [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 15, 2003 5:24 AM Subject: Re: Need some Tomcat Configuration help badly I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? Dick Steflik Nikola Milutinovic wrote: BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? True for both. It strikes me odd, I've been hearing about memory leak while recompiling JSPs for a couple of years. Is it really there and is it going to be removed in the near future? I recall that being attributed to javac memory leaks. That's why they advise to pre-compile JSP for production environment. I cannot fathom how can it be: a) so consistent b) not dependant on JDK version Any insight? Nix. - 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: Need some Tomcat Configuration help badly
Thanks, So far everything is going smoothly. I plan on manually restarting the server once a day to clean up any memory leak problems. The semester is over next weekend, so I just need to make it until then. I won't be teaching the course again until next Fall, hopefully, by then the Tomcat folk will have the memory leak problem fixed, or I can talk my department chair into letting me renew my academic license with macromedia for JRum. I'd rather stay Open Source but somtimes commercially available software fits the bill better. Also, next Fall I'm going to introduce EJBs and JBoss into the course, any suggestions on using that combo? Dick Steflik Binghamton University. Antony Paul wrote: Is your problem solved. I have noted one thing about Tomcat. If the compiled classes modification date is less than that of the machine running Tomcat, Tomcat will never know that the file is changed and never reload it. Only a reload can load the new class. This is true for servlets,beans nad JSP. I faced this problem when workstation machine time is behind server time. You can overcome this by syncing all machines clocks. Or advise students to perform a reload through the manager task. Or write an Ant script to reload it. rgds Antony Paul. - Original Message - From: Dick Steflik [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 15, 2003 5:24 AM Subject: Re: Need some Tomcat Configuration help badly I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? Dick Steflik Nikola Milutinovic wrote: BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? True for both. It strikes me odd, I've been hearing about memory leak while recompiling JSPs for a couple of years. Is it really there and is it going to be removed in the near future? I recall that being attributed to javac memory leaks. That's why they advise to pre-compile JSP for production environment. I cannot fathom how can it be: a) so consistent b) not dependant on JDK version Any insight? Nix. - 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: Need some Tomcat Configuration help badly
Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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: Need some Tomcat Configuration help badly
And you may also need to apply the class reloading hotfix for 4.1.27 http://www.apache.org/newsletter/200307.html#Jakarta_Tomcat The hotfix jar is now here: http://archive.apache.org/dist/jakarta/tomcat-4/binaries/ HTH, Jon Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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]
Re: Need some Tomcat Configuration help badly
OK, I downloaded the zip file; how do I install it. It contains StandardContext.class but i don't see that class file anywhere on my server. Dick Steflik Jon Wingfield wrote: And you may also need to apply the class reloading hotfix for 4.1.27 http://www.apache.org/newsletter/200307.html#Jakarta_Tomcat The hotfix jar is now here: http://archive.apache.org/dist/jakarta/tomcat-4/binaries/ HTH, Jon Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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]
Re: Need some Tomcat Configuration help badly
I already did that Matt. Thanks Dick Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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: Need some Tomcat Configuration help badly
Jon (or anyone else that is out there), If you are still out there could you tell me the correct way to install the hot fix. Dick Steflik Jon Wingfield wrote: And you may also need to apply the class reloading hotfix for 4.1.27 http://www.apache.org/newsletter/200307.html#Jakarta_Tomcat The hotfix jar is now here: http://archive.apache.org/dist/jakarta/tomcat-4/binaries/ HTH, Jon Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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]
RE: Need some Tomcat Configuration help badly
Unzip/untar it to your $CATALINA_HOME - it will extract it into the proper folders. -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 4:01 PM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Jon (or anyone else that is out there), If you are still out there could you tell me the correct way to install the hot fix. Dick Steflik Jon Wingfield wrote: And you may also need to apply the class reloading hotfix for 4.1.27 http://www.apache.org/newsletter/200307.html#Jakarta_Tomcat The hotfix jar is now here: http://archive.apache.org/dist/jakarta/tomcat-4/binaries/ HTH, Jon Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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]
Re: Need some Tomcat Configuration help badly
Matt, Thanks, that did the trick , the entire Fall2003 class of CS328 (actually the kids were probably hoping that it wouldn't get fixed and I would excuse them from the project) THANKS you . Dick Steflik Binghamton University Matt Raible wrote: Unzip/untar it to your $CATALINA_HOME - it will extract it into the proper folders. -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 4:01 PM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Jon (or anyone else that is out there), If you are still out there could you tell me the correct way to install the hot fix. Dick Steflik Jon Wingfield wrote: And you may also need to apply the class reloading hotfix for 4.1.27 http://www.apache.org/newsletter/200307.html#Jakarta_Tomcat The hotfix jar is now here: http://archive.apache.org/dist/jakarta/tomcat-4/binaries/ HTH, Jon Matt Raible wrote: Make sure you have reloadable=true in the contexts they're putting their beans into: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Matt -Original Message- From: Dick Steflik [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Need some Tomcat Configuration help badly I'm teaching a course that covers JSPs at the local university and have switched over to Tomcat from JRun this semester. I'm using v 4.1.27 and seem to be having a problem that I never remember having with JRun. The students are busily ftping their JSP and Javabeans to the server and testing (only a week left in the semester so I need help bad). The problem is, when they recompuile a bean and upload it to the server it seems to take forever (hours) before the server recognizes the new bean and servers it. The server recognizes that it is there but says it not there as its trying to compile the JSP. Dick Steflik Binghamton University Binghamton, NY - 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]
Re: Need some Tomcat Configuration help badly
Dick Steflik wrote: Thanks, that did the trick , the entire Fall2003 class of CS328 (actually the kids were probably hoping that it wouldn't get fixed and I would excuse them from the project) THANKS you . BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. To work around the memory leak issue when the context reloads you'll either have to regularly restart Tomcat, and you can also set the -Xmx startup parameter to something like -Xmx256M or higher if your machine has the memory so that it will take longer to run out of memory. By default java runs as if -Xmx64M was set. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Hi! David Rees wrote: BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Philipp Taprogge wrote: David Rees wrote: BTW, there is a bug with Tomcat which will cause it to run out of memory after a number of restarts. You will probably run into this with 30 students uploading new classes. You will also want to make sure that the fork attribute for the JspServlet is set to true as well as compiling JSPs will leak memory unless the compiling process is forked. Is this true only for Tomcat4 or for version 5 as well? True for both. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
: You will also want to make sure that : the fork attribute for the JspServlet is set to true as well as : compiling JSPs will leak memory unless the compiling process is forked. I didn't catch the OP's OS, but this could be a catch-22. I once ran into this one: Solaris fork() does copy-on-write for efficiency but to be on the safe side it also reserves enough swap to completely duplicate the parent process's mem, just in case. You get the picture: if the parent JVM process is huge (more than half the machine's overall mem) and it attempts to fork for a JSP compile, you'll get a different out-of-memory error. I don't know how Linux or other kernels handle this, but it's worth a look before deciding between fork/not fork for JSP compiles. -QM -- software -- http://www.brandxdev.net (C++ / Java / SSL) tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
I'm on W2000, just for the record. With this in mind which way should the fork be set; true ot false. Dick Steflik QM wrote: : You will also want to make sure that : the fork attribute for the JspServlet is set to true as well as : compiling JSPs will leak memory unless the compiling process is forked. I didn't catch the OP's OS, but this could be a catch-22. I once ran into this one: Solaris fork() does copy-on-write for efficiency but to be on the safe side it also reserves enough swap to completely duplicate the parent process's mem, just in case. You get the picture: if the parent JVM process is huge (more than half the machine's overall mem) and it attempts to fork for a JSP compile, you'll get a different out-of-memory error. I don't know how Linux or other kernels handle this, but it's worth a look before deciding between fork/not fork for JSP compiles. -QM -- software -- http://www.brandxdev.net (C++ / Java / SSL) tech news -- http://www.RoarNetworX.com - 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: Need some Tomcat Configuration help badly
Hi! Dick Steflik wrote: I'm on W2000, just for the record. With this in mind which way should the fork be set; true ot false. Concidering that this poor excuse for an OS does not even know the meaning of fork(), I'd say you set it to true. W2K should then start a completely new process from scratch. You'll loose some performance of course, since starting the JVM takes time and ressources, but if you don't compile many, many jsps at a time, that should not be too much of a problem. Phil P.S.: No pun intended here ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]