Re: OutOfMemory Errors
Hi, another idea... try to increase the size of the perm heap with -XX:permSize and -XX:maxPermSize. (See the JVM and garbage collector tuning docus from Sun for more information and google for more). Also try to enable the garbage collector log to check what happens to the perm memory in case of GCs. AFAIK the maxPermSize can be set fairly high, because it will be cut off your -Xmx setting, just when needed. We had a similar issue because the perm size was limited to/reached 64mb and at some point during runtime everything broke apart as we need about 100MB. Interesting: using the -d64 -server crashed already during Tomcat startup with too low perm size. Obviously the classes and all other perm memory code need more heap right from the beginning due to 64bit addressing. Unfortunately having not enough perm memory here can lead to out of memory exceptions although you seem to have enough free heap. ;-) Somebody at Sun forgot to offer a Java 1.4.x method to dump the free perm memory besides max, total and free heap that you could easily find out whats wrong without GC logging... Cheers, Michael Asim Alp wrote: Hello Peter, Sorry. My system config is: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have a heavily loaded JDBC application running and our MySQL server has enough max_connections to handle our load. For now, we have Apache, one of the Tomcats and MySQL running on the same machine (2 x 3.8 Ghz Intel with 2GB of Ram). We're also using this server as a file server with RAID 5. From Task Managers performance monitor, I'm looking at the Handles (I hope I'm looking at the correct thing). Total number of handles is around 30400 (almost two times 16K). Apache is usually using about 3000, Tomcat 5000, MySQL 9000, System 2600, svchost 1000. Do these values look normal? Asim On Mon, 13 Dec 2004 17:53:35 -, Peter Crowther [EMAIL PROTECTED] wrote: From: Asim Alp [mailto:[EMAIL PROTECTED] I'm trying to solve an OOME on our Tomcat. Tomcat version? JVM version and settings? Application characteristics? Other libraries in use (eg JDBC)? We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? I suspect someone else will give a better Java solution, but I'm a Windows hack who's a relative latecomer to Java... You've got 16k to go at by default. How many are you using, according to Performance Monitor? And how many in the JVM running Tomcat? One last thing... What other resources should I investigate for this sort of OOME? http://www.sysinternals.com/ for 'handle' and Process Explorer if you suspect a resource problem on Windows. - Peter - 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]
OutOfMemory Errors
I'm trying to solve an OOME on our Tomcat. We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? One last thing... What other resources should I investigate for this sort of OOME? Thanks, Asim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory Errors
From: Asim Alp [mailto:[EMAIL PROTECTED] I'm trying to solve an OOME on our Tomcat. Tomcat version? JVM version and settings? Application characteristics? Other libraries in use (eg JDBC)? We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? I suspect someone else will give a better Java solution, but I'm a Windows hack who's a relative latecomer to Java... You've got 16k to go at by default. How many are you using, according to Performance Monitor? And how many in the JVM running Tomcat? One last thing... What other resources should I investigate for this sort of OOME? http://www.sysinternals.com/ for 'handle' and Process Explorer if you suspect a resource problem on Windows. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory Errors
Perhaps you just arent allocating enough memory for your application and there is no leak. As always i recommend getting a hold of jvmstat from sun and it'll give you some visual clues as to what is going on. -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: 13 December 2004 17:47 To: Tomcat Users List Subject: OutOfMemory Errors I'm trying to solve an OOME on our Tomcat. We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? One last thing... What other resources should I investigate for this sort of OOME? Thanks, Asim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory Errors
You probably have a resource leak in your application. You might want to run FindBugs on it: http://findbugs.sourceforge.net/ George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 11:32 AM To: Tomcat Users List Subject: Re: OutOfMemory Errors Hello Peter, Sorry. My system config is: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have a heavily loaded JDBC application running and our MySQL server has enough max_connections to handle our load. For now, we have Apache, one of the Tomcats and MySQL running on the same machine (2 x 3.8 Ghz Intel with 2GB of Ram). We're also using this server as a file server with RAID 5. From Task Managers performance monitor, I'm looking at the Handles (I hope I'm looking at the correct thing). Total number of handles is around 30400 (almost two times 16K). Apache is usually using about 3000, Tomcat 5000, MySQL 9000, System 2600, svchost 1000. Do these values look normal? Asim On Mon, 13 Dec 2004 17:53:35 -, Peter Crowther [EMAIL PROTECTED] wrote: From: Asim Alp [mailto:[EMAIL PROTECTED] I'm trying to solve an OOME on our Tomcat. Tomcat version? JVM version and settings? Application characteristics? Other libraries in use (eg JDBC)? We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? I suspect someone else will give a better Java solution, but I'm a Windows hack who's a relative latecomer to Java... You've got 16k to go at by default. How many are you using, according to Performance Monitor? And how many in the JVM running Tomcat? One last thing... What other resources should I investigate for this sort of OOME? http://www.sysinternals.com/ for 'handle' and Process Explorer if you suspect a resource problem on Windows. - Peter - 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: OutOfMemory Errors
Thank you for the suggestion. Actually, we have upgraded from JDK 1.4.x to JDK 1.5.0 hoping to solve the problem, so I doubt that it is JDK related. On Mon, 13 Dec 2004 19:38:14 -0200, Ivan F. Martinez [EMAIL PROTECTED] wrote: On Mon, 13 Dec 2004 13:31:50 -0500 Asim Alp [EMAIL PROTECTED] wrote: AA Hello Peter, AA AA Sorry. My system config is: AA AA Windows Server 2003 AA Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 AA mod_jk/1.2.6 Tomcat 5.5.4 AA sun jdk 1.5.0-b64 Have you tried with JDK 1.4.x ? I have one app that eat all memory when running on jdk 1.5.0, and works fine on 1.4.x. I did not find any memory leak in APP. I think is related with JDK 1.5.0 -- - 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: OutOfMemory Errors
On Mon, 13 Dec 2004 13:31:50 -0500 Asim Alp [EMAIL PROTECTED] wrote: AA Hello Peter, AA AA Sorry. My system config is: AA AA Windows Server 2003 AA Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 AA mod_jk/1.2.6 Tomcat 5.5.4 AA sun jdk 1.5.0-b64 Have you tried with JDK 1.4.x ? I have one app that eat all memory when running on jdk 1.5.0, and works fine on 1.4.x. I did not find any memory leak in APP. I think is related with JDK 1.5.0 -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory Errors
Hello Peter, Sorry. My system config is: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have a heavily loaded JDBC application running and our MySQL server has enough max_connections to handle our load. For now, we have Apache, one of the Tomcats and MySQL running on the same machine (2 x 3.8 Ghz Intel with 2GB of Ram). We're also using this server as a file server with RAID 5. From Task Managers performance monitor, I'm looking at the Handles (I hope I'm looking at the correct thing). Total number of handles is around 30400 (almost two times 16K). Apache is usually using about 3000, Tomcat 5000, MySQL 9000, System 2600, svchost 1000. Do these values look normal? Asim On Mon, 13 Dec 2004 17:53:35 -, Peter Crowther [EMAIL PROTECTED] wrote: From: Asim Alp [mailto:[EMAIL PROTECTED] I'm trying to solve an OOME on our Tomcat. Tomcat version? JVM version and settings? Application characteristics? Other libraries in use (eg JDBC)? We profiled our application using JProfiler and there are no memory leakages on our end. Currently, I'm focusing on some system resource problems such as file descriptors. Would this be a valid problem on Windows Server 2003? And if so, how can I change the max number of file descriptors? I suspect someone else will give a better Java solution, but I'm a Windows hack who's a relative latecomer to Java... You've got 16k to go at by default. How many are you using, according to Performance Monitor? And how many in the JVM running Tomcat? One last thing... What other resources should I investigate for this sort of OOME? http://www.sysinternals.com/ for 'handle' and Process Explorer if you suspect a resource problem on Windows. - Peter - 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]
Registry problems followed by OutOfMemory errors
Here is our configuration: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have the following thread options set in the AJP/1.3 connector: maxThreads=1000 minSpareThreads=50 maxSpareThreads=300 And the following corresponding values in our workers.properties (same for each tomcat) worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=300 worker.tomcat1.cache_timeout=60 worker.worker1.local_worker=1 worker.tomcat1.lbfactor=1 worker.tomcat1.connect_timeout = 1000 worker.tomcat1.prepost_timeout = 1000 worker.tomcat1.reply_timeout = 7000 ... worker.loadbalancer.local_worker_only=0 We have a heavily loaded database application running. Same application runs on about 180 different virtual hosts on each Tomcat. We did profiling with JProfile and couldn't find any memory leaks in our application. Each Tomcat works perfect for about 8 to 10 hours, then all of a sudden, they start hanging (not necessarily at the same time). We monitor our heap memory very closely and we usually have enough FREE memory (more than 25%) when the following errors occur: First, we get a couple of SEVERE registering errors: record date2004-12-09T18:19:51/date millis1102634391333/millis sequence270/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodregisterComponent/method thread44/thread messageError registering Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message exception messagejavax.management.InstanceAlreadyExistsException: Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message frame classcom.sun.jmx.mbeanserver.RepositorySupport/class methodaddMBean/method line452/line /frame frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodinternal_addObject/method line1410/line /frame /exception /record record date2004-12-09T18:19:51/date millis1102634391333/millis sequence271/sequence loggerorg.apache.jk.common.ChannelSocket/logger levelWARNING/level classorg.apache.jk.common.ChannelSocket/class methodregisterRequest/method thread44/thread messageError registering request/message /record Followed by a couple of java.lang.OutOfMemoryError: PermGen space messages record date2004-12-09T21:48:25/date millis1102646905849/millis sequence294/sequence loggerStandardWrapper[/apps:jsp]/logger levelSEVERE/level classorg.apache.catalina.core.StandardWrapperValve/class methodinvoke/method thread47/thread messageServlet.service() for servlet jsp threw exception/message exception messagejava.lang.OutOfMemoryError: PermGen space/message /exception /record ... Followed by HUNDREDS (basically for each thread) of Error unregistering mbean messages record date2004-12-09T21:53:29/date millis1102647209630/millis sequence302/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method thread20/thread messageError unregistering mbean /message exception messagejavax.management.RuntimeOperationsException: Object name cannot be null/message frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodisRegistered/method line545/line /frame frame classcom.sun.jmx.mbeanserver.JmxMBeanServer/class methodisRegistered/method line619/line /frame frame classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method line642/line /frame ... /exception /record Any ideas? Is this something to do with our thread counts (maxThreads=1000 minSpareThreads=50 maxSpareThreads=300)? If so, how can we determine these numbers for fastest performance. We get about 5 hits every second and we want our Tomcats to serve static files as well (such as image files), so we want to make sure that we have enough threads. It's very important for our pages to load fast on the client side. Thank you very much! Any help would be greatly appreciated! Asim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Registry problems followed by OutOfMemory errors
Hi, Do you need JMX request registration? If not, turn it off by setting it to false in the configuration file. That'll save you some memory by itself. Your OOME is the root cause, so if you fix that the hundreds of others errors will likely go away. The OOME, in turn, is probably caused not because you're out of heap memory, but because you're out of another resource, such as file descriptors or threads. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 10:59 AM To: Tomcat Users List Subject: Registry problems followed by OutOfMemory errors Here is our configuration: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have the following thread options set in the AJP/1.3 connector: maxThreads=1000 minSpareThreads=50 maxSpareThreads=300 And the following corresponding values in our workers.properties (same for each tomcat) worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=300 worker.tomcat1.cache_timeout=60 worker.worker1.local_worker=1 worker.tomcat1.lbfactor=1 worker.tomcat1.connect_timeout = 1000 worker.tomcat1.prepost_timeout = 1000 worker.tomcat1.reply_timeout = 7000 ... worker.loadbalancer.local_worker_only=0 We have a heavily loaded database application running. Same application runs on about 180 different virtual hosts on each Tomcat. We did profiling with JProfile and couldn't find any memory leaks in our application. Each Tomcat works perfect for about 8 to 10 hours, then all of a sudden, they start hanging (not necessarily at the same time). We monitor our heap memory very closely and we usually have enough FREE memory (more than 25%) when the following errors occur: First, we get a couple of SEVERE registering errors: record date2004-12-09T18:19:51/date millis1102634391333/millis sequence270/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodregisterComponent/method thread44/thread messageError registering Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message exception messagejavax.management.InstanceAlreadyExistsException: Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message frame classcom.sun.jmx.mbeanserver.RepositorySupport/class methodaddMBean/method line452/line /frame frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodinternal_addObject/method line1410/line /frame /exception /record record date2004-12-09T18:19:51/date millis1102634391333/millis sequence271/sequence loggerorg.apache.jk.common.ChannelSocket/logger levelWARNING/level classorg.apache.jk.common.ChannelSocket/class methodregisterRequest/method thread44/thread messageError registering request/message /record Followed by a couple of java.lang.OutOfMemoryError: PermGen space messages record date2004-12-09T21:48:25/date millis1102646905849/millis sequence294/sequence loggerStandardWrapper[/apps:jsp]/logger levelSEVERE/level classorg.apache.catalina.core.StandardWrapperValve/class methodinvoke/method thread47/thread messageServlet.service() for servlet jsp threw exception/message exception messagejava.lang.OutOfMemoryError: PermGen space/message /exception /record ... Followed by HUNDREDS (basically for each thread) of Error unregistering mbean messages record date2004-12-09T21:53:29/date millis1102647209630/millis sequence302/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method thread20/thread messageError unregistering mbean /message exception messagejavax.management.RuntimeOperationsException: Object name cannot be null/message frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodisRegistered/method line545/line /frame frame classcom.sun.jmx.mbeanserver.JmxMBeanServer/class methodisRegistered/method line619/line /frame frame classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method line642/line /frame ... /exception /record Any ideas? Is this something to do with our thread counts (maxThreads=1000 minSpareThreads=50 maxSpareThreads=300)? If so, how can we determine these numbers for fastest performance. We get about 5 hits every second and we want our Tomcats to serve static files as well (such as image files), so we want to make sure that we have enough threads. It's very important for our pages to load fast on the client side. Thank you very much! Any help would be greatly appreciated! Asim
Re: Registry problems followed by OutOfMemory errors
Thanks for the quick reply! How can I turn off JMX request registration? I tried to find it in the Tomcat documentation, but all I could find was the MBean Descriptor How To which wasn't very helpful. I doubt that we need it. I will look into the resource problem. I doubt that we're running out of threads, because 1000 of them should be more than enough. Another resource problem could be the number of SQL connections, but on our SQL Side (MySQL), max_connections is set to 5000 which is about 7 times more than we need. Number of file descriptors might be a problem. For each web application, we have to load properties files and these files are automatically checked once every minute for possible updates. How can I configure the number of file descriptors? Thank you very much! Asim On Dec 10, 2004, at 11:02 AM, Shapira, Yoav wrote: Hi, Do you need JMX request registration? If not, turn it off by setting it to false in the configuration file. That'll save you some memory by itself. Your OOME is the root cause, so if you fix that the hundreds of others errors will likely go away. The OOME, in turn, is probably caused not because you're out of heap memory, but because you're out of another resource, such as file descriptors or threads. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 10:59 AM To: Tomcat Users List Subject: Registry problems followed by OutOfMemory errors Here is our configuration: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have the following thread options set in the AJP/1.3 connector: maxThreads=1000 minSpareThreads=50 maxSpareThreads=300 And the following corresponding values in our workers.properties (same for each tomcat) worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=300 worker.tomcat1.cache_timeout=60 worker.worker1.local_worker=1 worker.tomcat1.lbfactor=1 worker.tomcat1.connect_timeout = 1000 worker.tomcat1.prepost_timeout = 1000 worker.tomcat1.reply_timeout = 7000 ... worker.loadbalancer.local_worker_only=0 We have a heavily loaded database application running. Same application runs on about 180 different virtual hosts on each Tomcat. We did profiling with JProfile and couldn't find any memory leaks in our application. Each Tomcat works perfect for about 8 to 10 hours, then all of a sudden, they start hanging (not necessarily at the same time). We monitor our heap memory very closely and we usually have enough FREE memory (more than 25%) when the following errors occur: First, we get a couple of SEVERE registering errors: record date2004-12-09T18:19:51/date millis1102634391333/millis sequence270/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodregisterComponent/method thread44/thread messageError registering Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message exception messagejavax.management.InstanceAlreadyExistsException: Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message frame classcom.sun.jmx.mbeanserver.RepositorySupport/class methodaddMBean/method line452/line /frame frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodinternal_addObject/method line1410/line /frame /exception /record record date2004-12-09T18:19:51/date millis1102634391333/millis sequence271/sequence loggerorg.apache.jk.common.ChannelSocket/logger levelWARNING/level classorg.apache.jk.common.ChannelSocket/class methodregisterRequest/method thread44/thread messageError registering request/message /record Followed by a couple of java.lang.OutOfMemoryError: PermGen space messages record date2004-12-09T21:48:25/date millis1102646905849/millis sequence294/sequence loggerStandardWrapper[/apps:jsp]/logger levelSEVERE/level classorg.apache.catalina.core.StandardWrapperValve/class methodinvoke/method thread47/thread messageServlet.service() for servlet jsp threw exception/message exception messagejava.lang.OutOfMemoryError: PermGen space/message /exception /record ... Followed by HUNDREDS (basically for each thread) of Error unregistering mbean messages record date2004-12-09T21:53:29/date millis1102647209630/millis sequence302/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method thread20/thread messageError unregistering mbean /message exception messagejavax.management.RuntimeOperationsException: Object name cannot be null/message frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodisRegistered/method line545/line /frame frame
Re: Registry problems followed by OutOfMemory errors
Asim Alp [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the quick reply! How can I turn off JMX request registration? I tried to find it in the Tomcat documentation, but all I could find was the MBean Descriptor How To which wasn't very helpful. I doubt that we need it. Set request.registerRequests=false on the Connector. I will look into the resource problem. I doubt that we're running out of threads, because 1000 of them should be more than enough. Another resource problem could be the number of SQL connections, but on our SQL Side (MySQL), max_connections is set to 5000 which is about 7 times more than we need. Number of file descriptors might be a problem. For each web application, we have to load properties files and these files are automatically checked once every minute for possible updates. How can I configure the number of file descriptors? Thank you very much! Asim On Dec 10, 2004, at 11:02 AM, Shapira, Yoav wrote: Hi, Do you need JMX request registration? If not, turn it off by setting it to false in the configuration file. That'll save you some memory by itself. Your OOME is the root cause, so if you fix that the hundreds of others errors will likely go away. The OOME, in turn, is probably caused not because you're out of heap memory, but because you're out of another resource, such as file descriptors or threads. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 10:59 AM To: Tomcat Users List Subject: Registry problems followed by OutOfMemory errors Here is our configuration: Windows Server 2003 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6 Tomcat 5.5.4 sun jdk 1.5.0-b64 We have a 2 node tomcat cluster each running with the -Xms128m -Xmx1024m options. We have the following thread options set in the AJP/1.3 connector: maxThreads=1000 minSpareThreads=50 maxSpareThreads=300 And the following corresponding values in our workers.properties (same for each tomcat) worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=300 worker.tomcat1.cache_timeout=60 worker.worker1.local_worker=1 worker.tomcat1.lbfactor=1 worker.tomcat1.connect_timeout = 1000 worker.tomcat1.prepost_timeout = 1000 worker.tomcat1.reply_timeout = 7000 ... worker.loadbalancer.local_worker_only=0 We have a heavily loaded database application running. Same application runs on about 180 different virtual hosts on each Tomcat. We did profiling with JProfile and couldn't find any memory leaks in our application. Each Tomcat works perfect for about 8 to 10 hours, then all of a sudden, they start hanging (not necessarily at the same time). We monitor our heap memory very closely and we usually have enough FREE memory (more than 25%) when the following errors occur: First, we get a couple of SEVERE registering errors: record date2004-12-09T18:19:51/date millis1102634391333/millis sequence270/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodregisterComponent/method thread44/thread messageError registering Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message exception messagejavax.management.InstanceAlreadyExistsException: Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest2291/ message frame classcom.sun.jmx.mbeanserver.RepositorySupport/class methodaddMBean/method line452/line /frame frame classcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor/class methodinternal_addObject/method line1410/line /frame /exception /record record date2004-12-09T18:19:51/date millis1102634391333/millis sequence271/sequence loggerorg.apache.jk.common.ChannelSocket/logger levelWARNING/level classorg.apache.jk.common.ChannelSocket/class methodregisterRequest/method thread44/thread messageError registering request/message /record Followed by a couple of java.lang.OutOfMemoryError: PermGen space messages record date2004-12-09T21:48:25/date millis1102646905849/millis sequence294/sequence loggerStandardWrapper[/apps:jsp]/logger levelSEVERE/level classorg.apache.catalina.core.StandardWrapperValve/class methodinvoke/method thread47/thread messageServlet.service() for servlet jsp threw exception/message exception messagejava.lang.OutOfMemoryError: PermGen space/message /exception /record ... Followed by HUNDREDS (basically for each thread) of Error unregistering mbean messages record date2004-12-09T21:53:29/date millis1102647209630/millis sequence302/sequence loggerorg.apache.commons.modeler.Registry/logger levelSEVERE/level classorg.apache.commons.modeler.Registry/class methodunregisterComponent/method thread20/thread messageError unregistering mbean /message exception
RE: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
I have a copy of the old jvmstat if you'd like me to email it to you direct? -Original Message- From: Kevin A. Burton [mailto:[EMAIL PROTECTED] Sent: 15 November 2004 19:51 To: Tomcat Users List Subject: Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4 Dale, Matt wrote: I've not been following this thread but my guess would be that you are running out of space in the permanent generation of the heap. Get a hold of jvmstat from sun and run visualgc on your JVM, it should become obvious then which pool is running out of space. God! How pathetic is this: http://java.sun.com/performance/jvmstat/#Download This distribution of the jvmstat tools requires J2SE 5.0 with the HotSpot JVM. So now I have to upgrade all our VMs to JDK 5.0 even though earlier versions of jvmstat supported JDK 1.4. Brilliant... who's the marketing genius that though of this one!? ... and of course they don't link to archival versions. The SUN has set my friends ;-) Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
Remy Maucherat wrote: On Sat, 13 Nov 2004 17:30:38 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: Remy Maucherat wrote: On Fri, 12 Nov 2004 17:17:28 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation How many JSPs must be compiled to cause problems ? About 50 or so... it changes every time. Sometimes I have to trigger a precompile twice. I don't quite understand in which cases problems occur: - if you ?jsp_precompile=true 50 times for the same JSP ? - if you ?jsp_precompile=true for 50 different JSPs ? - if you access normally 50 different JSPs (triggering compilation for each one) ? I would understand from your description only the second one is an issue. Can you confirm this ? Yes... I use #2 I trigger a ?jsp_precompile=true for each one of my JSPs and we have around 300-400 ... Around 100 or so it will run out of memory. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
Dale, Matt wrote: I've not been following this thread but my guess would be that you are running out of space in the permanent generation of the heap. Get a hold of jvmstat from sun and run visualgc on your JVM, it should become obvious then which pool is running out of space. God! How pathetic is this: http://java.sun.com/performance/jvmstat/#Download This distribution of the jvmstat tools requires J2SE 5.0 with the HotSpot JVM. So now I have to upgrade all our VMs to JDK 5.0 even though earlier versions of jvmstat supported JDK 1.4. Brilliant... who's the marketing genius that though of this one!? ... and of course they don't link to archival versions. The SUN has set my friends ;-) Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
I've not been following this thread but my guess would be that you are running out of space in the permanent generation of the heap. Get a hold of jvmstat from sun and run visualgc on your JVM, it should become obvious then which pool is running out of space. Ta Matt -Original Message- From: Kevin A. Burton [mailto:[EMAIL PROTECTED] Sent: 14 November 2004 01:31 To: Tomcat Users List Subject: Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4 Remy Maucherat wrote: On Fri, 12 Nov 2004 17:17:28 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation How many JSPs must be compiled to cause problems ? About 50 or so... it changes every time. Sometimes I have to trigger a precompile twice. Note that the VM still shows plenty of memory so I'm not sure what the heck is going on here. I also looked at our file handles and they seem fine too. In that kind of situation, a profiler will have to be used. All I can tell right now is that it has nothing to do with the Java compilation, which is not very surprising. Why is it then that doing a ?jsp_precompile=true for all my JSPs and NO other action causes this? For really large web applications, I think you should precompile as many JSPs as possible anyway, as a JSP compiled dynamically will always use more resources (even if there is no bug in Jasper). Well thats probably an approach we will take but its unfortunate. If i had a profiler I would connect it to figure out whats going on but I'm really not happy with any of them. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
On Sat, 13 Nov 2004 17:30:38 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: Remy Maucherat wrote: On Fri, 12 Nov 2004 17:17:28 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation How many JSPs must be compiled to cause problems ? About 50 or so... it changes every time. Sometimes I have to trigger a precompile twice. I don't quite understand in which cases problems occur: - if you ?jsp_precompile=true 50 times for the same JSP ? - if you ?jsp_precompile=true for 50 different JSPs ? - if you access normally 50 different JSPs (triggering compilation for each one) ? I would understand from your description only the second one is an issue. Can you confirm this ? -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
On Fri, 12 Nov 2004 17:17:28 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation How many JSPs must be compiled to cause problems ? Note that the VM still shows plenty of memory so I'm not sure what the heck is going on here. I also looked at our file handles and they seem fine too. In that kind of situation, a profiler will have to be used. All I can tell right now is that it has nothing to do with the Java compilation, which is not very surprising. For really large web applications, I think you should precompile as many JSPs as possible anyway, as a JSP compiled dynamically will always use more resources (even if there is no bug in Jasper). -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
Remy Maucherat wrote: On Fri, 12 Nov 2004 17:17:28 -0800, Kevin A. Burton [EMAIL PROTECTED] wrote: - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation How many JSPs must be compiled to cause problems ? About 50 or so... it changes every time. Sometimes I have to trigger a precompile twice. Note that the VM still shows plenty of memory so I'm not sure what the heck is going on here. I also looked at our file handles and they seem fine too. In that kind of situation, a profiler will have to be used. All I can tell right now is that it has nothing to do with the Java compilation, which is not very surprising. Why is it then that doing a ?jsp_precompile=true for all my JSPs and NO other action causes this? For really large web applications, I think you should precompile as many JSPs as possible anyway, as a JSP compiled dynamically will always use more resources (even if there is no bug in Jasper). Well thats probably an approach we will take but its unfortunate. If i had a profiler I would connect it to figure out whats going on but I'm really not happy with any of them. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
I'm having a terrible time trying to get my JSPs compiled on Tomcat. We started having OutOfMemory problems a while back and I've tracked it down to JSP compilation. Here's what I can do to replicate the problem: - shutdown tomcat - remove the work directory - startup tomcat - For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true to trigger precompilation After about 10 minutes (and 50-100 JSP files) Tomcat will fail with: SEVERE: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError Note that the VM still shows plenty of memory so I'm not sure what the heck is going on here. I also looked at our file handles and they seem fine too. I've followed all suggestions I've found via Google including: - setting fork to true - using jikes - Migrating to Tomcat 5.5.4 to use jdtool. The machine has PLENTY of memory available: export JAVA_OPTS=-server -Xmx1280M -Xms512M -Djava.awt.headless=true Any suggestions would be appreciated. We're probably going to migrate to using the command line JspC compiler to build all our JSPs before hand so the webapp doesn't need to compile them at runtime but this seems like a cheap workaround. I'd rather Tomcat weren't broken in this regard. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting opts to avoid OutOfMemory errors
X-Kagi-AutoReply:r2db Hello, You sent an email that does not contain the formated purchase data that this email account is able to parse. So that we may be able to assist you, we offer the following suggestions. If you are writing to ask a question about a payment made to Kagi, you might be able to obtain answers to your questions through our online Payment Query System located at http://info.kagi.com If you have a question concerning a specific product you have purchased, we suggest that you directly contact the company that produced the product. They will be able to answer questions about the use of the product. Their email or web site should be noted in the product documentation or their online order page that can be found by searching for the product at http://order.kagi.com If you wish to purchase a product, you can order online and pay with credit card, cash or check by searching for the product order page at http://order.kagi.com or if you have used a Register program, you can send the output of the Register program to [EMAIL PROTECTED] Finally, if you wish to direct your question to a human being at Kagi, please send your email to [EMAIL PROTECTED] and please just type your message into the email, do not send an attachment. Thank you, [EMAIL PROTECTED] -- X-Kagi-AutoReply:r2db Hello, You sent an email that does not contain the formated purchase data that this email account is able to parse. So that we may be able to assist you, we offer the following suggestions. If you are writing to ask a question about a payment made to Kagi, you might be able to obtain answers to your questions through our online Payment Query System located at http://info.kagi.com If you have a question concerning a specific product you have purchased, we suggest that you directly contact the company that produced the product. They will be able to answer questions about the use of the product. Their email or web site should be noted in the product documentation or their online order page that can be found by searching for the product at http://order.kagi.com If you wish to purchase a product, you can order online and pay with credit card, cash or check by searching for the product order page at http://order.kagi.com or if you have used a Register program, you can send the output of the Register program to [EMAIL PROTECTED] Finally, if you wish to direct your question to a human being at Kagi, please send your email to [EMAIL PROTECTED] and please just type your message into the email, do not send an attachment. Thank you, [EMAIL PROTECTED] -- Hi, Shapira, Yoav wrote: Howdy, The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Well, that's your opinion. ;) I for one disagree. In addition, this issue is well-documented in several places, including the JSPs How-To (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html), the Release Notes, the JSP servlet in $CATALINA_HOME/conf/web.xml, this mailing list's archives, and links to this mailing list's archives from the tomcat FAQ Memory page. Workarounds such as precompilingare also documented in at least one of the above places, including pre-compiling your JSPs. Sorry - I was trying to use tomcat 4.1.29 and never looked at 5.0 docs. In 4.1 ones there are really vague advices regarding memory ;-( Also the 4.1.x was for quite a long period of time regarded as stable - not very stable with the default setting. and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp If this (the JSP page source changing on every user request) is a realistic scenario for your webapp, you will also run into other, deeper performance- and data-integrity related issues. But why do I get the feeling the above script doesn't mimic any realistic production system scenario? ;) Come on! That was an isolation test case. Of course this is not a production system. On the production system we have approx 20-30 jsps with headers being updated (XMLs fetched and transformed) from another service once in an hour. But this system could stay up no longer than 2 days. If I new that the compilation is a problem I would do it otherwise - but I have suspected our code with the leak. Tried to use insane (http://performance.netbeans.org/insane/) to find the leak and found the tomcat buffers ... Best regards, David Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain
Re: setting opts to avoid OutOfMemory errors
X-Kagi-AutoReply:r2db Hello, You sent an email that does not contain the formated purchase data that this email account is able to parse. So that we may be able to assist you, we offer the following suggestions. If you are writing to ask a question about a payment made to Kagi, you might be able to obtain answers to your questions through our online Payment Query System located at http://info.kagi.com If you have a question concerning a specific product you have purchased, we suggest that you directly contact the company that produced the product. They will be able to answer questions about the use of the product. Their email or web site should be noted in the product documentation or their online order page that can be found by searching for the product at http://order.kagi.com If you wish to purchase a product, you can order online and pay with credit card, cash or check by searching for the product order page at http://order.kagi.com or if you have used a Register program, you can send the output of the Register program to [EMAIL PROTECTED] Finally, if you wish to direct your question to a human being at Kagi, please send your email to [EMAIL PROTECTED] and please just type your message into the email, do not send an attachment. Thank you, [EMAIL PROTECTED] -- Hi, Shapira, Yoav wrote: Howdy, The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Well, that's your opinion. ;) I for one disagree. In addition, this issue is well-documented in several places, including the JSPs How-To (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html), the Release Notes, the JSP servlet in $CATALINA_HOME/conf/web.xml, this mailing list's archives, and links to this mailing list's archives from the tomcat FAQ Memory page. Workarounds such as precompilingare also documented in at least one of the above places, including pre-compiling your JSPs. Sorry - I was trying to use tomcat 4.1.29 and never looked at 5.0 docs. In 4.1 ones there are really vague advices regarding memory ;-( Also the 4.1.x was for quite a long period of time regarded as stable - not very stable with the default setting. and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp If this (the JSP page source changing on every user request) is a realistic scenario for your webapp, you will also run into other, deeper performance- and data-integrity related issues. But why do I get the feeling the above script doesn't mimic any realistic production system scenario? ;) Come on! That was an isolation test case. Of course this is not a production system. On the production system we have approx 20-30 jsps with headers being updated (XMLs fetched and transformed) from another service once in an hour. But this system could stay up no longer than 2 days. If I new that the compilation is a problem I would do it otherwise - but I have suspected our code with the leak. Tried to use insane (http://performance.netbeans.org/insane/) to find the leak and found the tomcat buffers ... Best regards, David 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: setting opts to avoid OutOfMemory errors
X-Kagi-AutoReply:r2db Hello, You sent an email that does not contain the formated purchase data that this email account is able to parse. So that we may be able to assist you, we offer the following suggestions. If you are writing to ask a question about a payment made to Kagi, you might be able to obtain answers to your questions through our online Payment Query System located at http://info.kagi.com If you have a question concerning a specific product you have purchased, we suggest that you directly contact the company that produced the product. They will be able to answer questions about the use of the product. Their email or web site should be noted in the product documentation or their online order page that can be found by searching for the product at http://order.kagi.com If you wish to purchase a product, you can order online and pay with credit card, cash or check by searching for the product order page at http://order.kagi.com or if you have used a Register program, you can send the output of the Register program to [EMAIL PROTECTED] Finally, if you wish to direct your question to a human being at Kagi, please send your email to [EMAIL PROTECTED] and please just type your message into the email, do not send an attachment. Thank you, [EMAIL PROTECTED] -- Howdy, The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Well, that's your opinion. ;) I for one disagree. In addition, this issue is well-documented in several places, including the JSPs How-To (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html), the Release Notes, the JSP servlet in $CATALINA_HOME/conf/web.xml, this mailing list's archives, and links to this mailing list's archives from the tomcat FAQ Memory page. Workarounds such as precompilingare also documented in at least one of the above places, including pre-compiling your JSPs. and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp If this (the JSP page source changing on every user request) is a realistic scenario for your webapp, you will also run into other, deeper performance- and data-integrity related issues. But why do I get the feeling the above script doesn't mimic any realistic production system scenario? ;) 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: setting opts to avoid OutOfMemory errors
David Strupl wrote: Sorry but how do I set the fork attribute of the JspServlet to true? Look at Tomcat's conf/web.xml, and you will see it. This seems like an obvoius memory leak in somewhere IMHO: snip Is this how is tomcat supposed to work (on SUN's JDK)? Your script will cause TC to run OOM unless the fork option for compiling JSPs is set to true. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting opts to avoid OutOfMemory errors
David Rees wrote: David Strupl wrote: Sorry but how do I set the fork attribute of the JspServlet to true? Look at Tomcat's conf/web.xml, and you will see it. Aha. I see. I was editing only server.xml previously. This seems like an obvoius memory leak in somewhere IMHO: snip Is this how is tomcat supposed to work (on SUN's JDK)? Your script will cause TC to run OOM unless the fork option for compiling JSPs is set to true. The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Thanks for your help and best regards, David -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting opts to avoid OutOfMemory errors
Howdy, The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Well, that's your opinion. ;) I for one disagree. In addition, this issue is well-documented in several places, including the JSPs How-To (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html), the Release Notes, the JSP servlet in $CATALINA_HOME/conf/web.xml, this mailing list's archives, and links to this mailing list's archives from the tomcat FAQ Memory page. Workarounds such as precompilingare also documented in at least one of the above places, including pre-compiling your JSPs. and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp If this (the JSP page source changing on every user request) is a realistic scenario for your webapp, you will also run into other, deeper performance- and data-integrity related issues. But why do I get the feeling the above script doesn't mimic any realistic production system scenario? ;) 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: setting opts to avoid OutOfMemory errors
Hi, Shapira, Yoav wrote: Howdy, The fact that in the stock distribution the fork attrribute is set to false by default is IMHO not very good choice. Took me several days of headaches trying to find the leak in my code. When there is a disign choice slow versus crash for 1% of users I would choose slow and put into some doc how to make it faster if it is required. Well, that's your opinion. ;) I for one disagree. In addition, this issue is well-documented in several places, including the JSPs How-To (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html), the Release Notes, the JSP servlet in $CATALINA_HOME/conf/web.xml, this mailing list's archives, and links to this mailing list's archives from the tomcat FAQ Memory page. Workarounds such as precompilingare also documented in at least one of the above places, including pre-compiling your JSPs. Sorry - I was trying to use tomcat 4.1.29 and never looked at 5.0 docs. In 4.1 ones there are really vague advices regarding memory ;-( Also the 4.1.x was for quite a long period of time regarded as stable - not very stable with the default setting. and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp If this (the JSP page source changing on every user request) is a realistic scenario for your webapp, you will also run into other, deeper performance- and data-integrity related issues. But why do I get the feeling the above script doesn't mimic any realistic production system scenario? ;) Come on! That was an isolation test case. Of course this is not a production system. On the production system we have approx 20-30 jsps with headers being updated (XMLs fetched and transformed) from another service once in an hour. But this system could stay up no longer than 2 days. If I new that the compilation is a problem I would do it otherwise - but I have suspected our code with the leak. Tried to use insane (http://performance.netbeans.org/insane/) to find the leak and found the tomcat buffers ... Best regards, David 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: setting opts to avoid OutOfMemory errors
Howdy, Sorry - I was trying to use tomcat 4.1.29 and never looked at 5.0 docs. The same is documented in the places I mentioned for the tomcat 4.1 versions, e.g. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. In 4.1 ones there are really vague advices regarding memory ;-( Also the 4.1.x was for quite a long period of time regarded as stable - not very stable with the default setting. It's still regarded as stable, including with the default setting. Just not developed as much, only bug/security fixes. Come on! That was an isolation test case. Of course this is not a production system. On the production system we have approx 20-30 jsps with headers being updated (XMLs fetched and transformed) from another service once in an hour. But this system could stay up no longer than 2 days. If I new that the compilation is a problem I would do it otherwise - but I have suspected our code with the leak. Tried to use insane (http://performance.netbeans.org/insane/) to find the leak and found the tomcat buffers ... So you have an application running on a server that for some reason has a memory leak. This is not a rare problem. You try to track it. You can use a bunch of tools and analyzers, and maybe find the solution yourself. Or you can try to search the documentation first, which as I mentioned contains information about this issue in several very prominent and easy to find spots. 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: setting opts to avoid OutOfMemory errors
Shapira, Yoav wrote: The same is documented in the places I mentioned for the tomcat 4.1 versions, e.g. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. You are right. It is there. I sincerely apologize but I have read only http://jakarta.apache.org/tomcat/faq/memory.html and it was not there, nore in the links mentioned there. Should have searched longer ... So you have an application running on a server that for some reason has a memory leak. This is not a rare problem. You try to track it. You can use a bunch of tools and analyzers, and maybe find the solution yourself. Exactly what I did. Or you can try to search the documentation first, Also did. Unfortunatelly only by using google. which as I mentioned contains information about this issue in several very prominent and easy to find spots. Yes. It contains. prominent and easy to find spots. : Well, that's your opinion. I for one disagree. Having somthing in the docs is cool but if the thing could just work out of the box it would be even better. But you don't have to agree with this. Enough said. Best regards, David Strupl 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: setting opts to avoid OutOfMemory errors
Howdy, You are right. It is there. I sincerely apologize but I have read only http://jakarta.apache.org/tomcat/faq/memory.html and it was not there, nore in the links mentioned there. Should have searched longer ... I just added there as well, especially for this situation. prominent and easy to find spots. : Well, that's your opinion. I for one disagree. OK. I'll try to come up with tomcat documentation locations that are more prominent than the RELEASE-NOTES, the JSP HOW-TO, and the FAQ. I'll let you know if I find any such spots. Have a good weekend ;) 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: setting opts to avoid OutOfMemory errors
Hi, David Rees wrote: All increasing the -Xmx256M setting will do is delay the onset of the OOM condition, it won't fix it. If you compile a lot of JSPs, make sure that in the container's web.xml you set the fork attribute of the JspServlet to true or use jikes, otherwise that will leak memory as well. With a machine that has 500M, I wouldn't use more than 256M for Tomcat unless nothing else is running on it. -Dave Sorry but how do I set the fork attribute of the JspServlet to true? This seems like an obvoius memory leak in somewhere IMHO: I run tomcat-4.1.29 SUN JDK 1.4.1 (or 1.4.2 if that matters) and creating this test.jsp htmlhead/headbody % System.gc(); out.print(Runtime.getRuntime().freeMemory()); out.print(\t + Runtime.getRuntime().totalMemory()); out.print(\t + new java.util.Date()); % /body/html and following bash script: while [ 1 ] do /usr/bin/lynx -dump http://localhost:8080/test.jsp /tmp/m.txt touch /usr/local/jakarta-tomcat-4.1.29/webapps/ROOT/test.jsp done slowly crashes the tomcat instance. You can watch the progress via tail -f /tmp/m.txt. Is this how is tomcat supposed to work (on SUN's JDK)? Best regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting opts to avoid OutOfMemory errors
Howdy, Don't blindly increase the max memory: figure out how much your application SHOULD need in order to handle the expected maximum load with an acceptable response time. Set your app to that number and load-test it. Repeat until you arrive at the true max memory needed for your app. It may be more than 500MB or much less. And do not blindly set -Xms=-Xmx, that's old advice that some people take as a rule of thumb. Allocation costs on JDK 1.4 and later are cheap. Yoav Shapira Millennium ChemInformatics -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 5:52 PM To: Tomcat Users List Subject: Re: setting opts to avoid OutOfMemory errors Hans Steinraht wrote: Maybe someone can help me out with some questions I have to avoid the OutOfMemory errors that I have from time to time The computer where Tomcat, version 4.1.24, is running is a linux machine wit 500M memory and j2sdk1.4.1. I have read in this newsgroup that the solutions to avoid OutOfMemory errors is to set the initial size of the memory allocation pool Xms to a value and also the max size Xmx. In this I have to questions: 1. what are the best values? 2. happends when I set the values to high? I have tried running tomcat with JAVA_OPTS=-Xms64m -Xmx256m, but the problem still occurs, so can I set Xmx to 500m, but what is than happening with the memory left (maybe there isn't) for tha other applications on thie machine. All increasing the -Xmx256M setting will do is delay the onset of the OOM condition, it won't fix it. If you compile a lot of JSPs, make sure that in the container's web.xml you set the fork attribute of the JspServlet to true or use jikes, otherwise that will leak memory as well. With a machine that has 500M, I wouldn't use more than 256M for Tomcat unless nothing else is running on it. -Dave - 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]
setting opts to avoid OutOfMemory errors
Maybe someone can help me out with some questions I have to avoid the OutOfMemory errors that I have from time to time The computer where Tomcat, version 4.1.24, is running is a linux machine wit 500M memory and j2sdk1.4.1. I have read in this newsgroup that the solutions to avoid OutOfMemory errors is to set the initial size of the memory allocation pool Xms to a value and also the max size Xmx. In this I have to questions: 1. what are the best values? 2. happends when I set the values to high? I have tried running tomcat with JAVA_OPTS=-Xms64m -Xmx256m, but the problem still occurs, so can I set Xmx to 500m, but what is than happening with the memory left (maybe there isn't) for tha other applications on thie machine. I hope someone can clear things a bit up for me, Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting opts to avoid OutOfMemory errors
Maybe someone can help me out with some questions I have to avoid the OutOfMemory errors that I have from time to time The computer where Tomcat, version 4.1.24, is running is a linux machine wit 500M memory and j2sdk1.4.1. I have read in this newsgroup that the solutions to avoid OutOfMemory errors is to set the initial size of the memory allocation pool Xms to a value and also the max size Xmx. In this I have to questions: 1. what are the best values? 2. happends when I set the values to high? I have tried running tomcat with JAVA_OPTS=-Xms64m -Xmx256m, but the problem still occurs, so can I set Xmx to 500m, but what is than happening with the memory left (maybe there isn't) for tha other applications on thie machine. I hope someone can clear things a bit up for me, Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting opts to avoid OutOfMemory errors
Hans Steinraht wrote: Maybe someone can help me out with some questions I have to avoid the OutOfMemory errors that I have from time to time The computer where Tomcat, version 4.1.24, is running is a linux machine wit 500M memory and j2sdk1.4.1. I have read in this newsgroup that the solutions to avoid OutOfMemory errors is to set the initial size of the memory allocation pool Xms to a value and also the max size Xmx. In this I have to questions: 1. what are the best values? 2. happends when I set the values to high? I have tried running tomcat with JAVA_OPTS=-Xms64m -Xmx256m, but the problem still occurs, so can I set Xmx to 500m, but what is than happening with the memory left (maybe there isn't) for tha other applications on thie machine. All increasing the -Xmx256M setting will do is delay the onset of the OOM condition, it won't fix it. If you compile a lot of JSPs, make sure that in the container's web.xml you set the fork attribute of the JspServlet to true or use jikes, otherwise that will leak memory as well. With a machine that has 500M, I wouldn't use more than 256M for Tomcat unless nothing else is running on it. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]