RE: Java Heap Space Error
In Windows, the installer define Initial memory pool: 128 MB and Maximum memory pool: 256 MB, the configuration is available in the Tomcat8w gui app. I see the same on Tomcat 8 and 9. -Original Message- From: Christopher Schultz Sent: jueves, 20 de abril de 2023 09:21 a. m. To: users@tomcat.apache.org Subject: Re: Java Heap Space Error Pratik, On 4/20/23 03:35, pratik.kulka...@shell.com.INVALID wrote: > I guess you're right, Tomcat 9 allocates less default memory compared > to Tomcat 8; I checked our logs and below are the memory parameters > which seem to be passed in, > > Tomcat 9 - > > 14-Apr-2023 02:47:55.567 INFO [main] > org.apache.catalina.startup.VersionLoggerListener.log Command line > argument: -Xms128m > 14-Apr-2023 02:47:55.567 INFO [main] > org.apache.catalina.startup.VersionLoggerListener.log Command line > argument: -Xmx256m > > Tomcat 8 - > > 13-Apr-2023 06:10:01.520 INFO [main] > org.apache.catalina.startup.VersionLoggerListener.log Command line > argument: -Xms512m > 13-Apr-2023 06:10:01.520 INFO [main] > org.apache.catalina.startup.VersionLoggerListener.log Command line > argument: -Xmx1024m > > Like you suggested, I updated the configuration using Tomcat9w.exe since we > are running Tomcat as a service and it is now working without any errors! I > updated the sizes from 128MB and 256MB to 512MB and 1024MB respectively for > max and min pool sizes. > > Thank you very much everyone for your help, I truly appreciate it. I believe > we can mark this thread as solved. I don't believe Tomcat comes with any default at all. Whatever you are seeing there probably came from a local setup that you (or someone else local) did. Glad you got things working again. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. La información transmitida está destinada únicamente a la persona o entidad a quien que va dirigida y puede contener información confidencial y/o material privilegiado. Cualquier revisión, retransmisión, difusión u otros usos, o cualquier acción tomada por personas o entidades distintas al destinatario basándose en esta información está prohibida. Si usted recibe este mensaje por error, por favor contacte al remitente y elimine el material de cualquier computadora. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
Pratik, On 4/20/23 03:35, pratik.kulka...@shell.com.INVALID wrote: I guess you're right, Tomcat 9 allocates less default memory compared to Tomcat 8; I checked our logs and below are the memory parameters which seem to be passed in, Tomcat 9 - 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m Tomcat 8 - 13-Apr-2023 06:10:01.520 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512m 13-Apr-2023 06:10:01.520 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m Like you suggested, I updated the configuration using Tomcat9w.exe since we are running Tomcat as a service and it is now working without any errors! I updated the sizes from 128MB and 256MB to 512MB and 1024MB respectively for max and min pool sizes. Thank you very much everyone for your help, I truly appreciate it. I believe we can mark this thread as solved. I don't believe Tomcat comes with any default at all. Whatever you are seeing there probably came from a local setup that you (or someone else local) did. Glad you got things working again. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java Heap Space Error
Thanks Chris, I guess you're right, Tomcat 9 allocates less default memory compared to Tomcat 8; I checked our logs and below are the memory parameters which seem to be passed in, Tomcat 9 - 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m Tomcat 8 - 13-Apr-2023 06:10:01.520 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512m 13-Apr-2023 06:10:01.520 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m Like you suggested, I updated the configuration using Tomcat9w.exe since we are running Tomcat as a service and it is now working without any errors! I updated the sizes from 128MB and 256MB to 512MB and 1024MB respectively for max and min pool sizes. Thank you very much everyone for your help, I truly appreciate it. I believe we can mark this thread as solved. Kind regards, Pratik Kulkarni - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
Pratik, On 4/13/23 22:55, pratik.kulka...@shell.com.INVALID wrote: Chris - I see. So we already have installed a service and I tried to set the environment variable after we got the error. Is there a way for Tomcat to read the variables we set after installation? If you are running the Windows Service to launch Tomcat, you need to edit the service using tomcat9w.exe. There is a panel for Java options and you can set the heap sizes there. Also, what I meant by "when I access the application" is that it worked for a few requests; but as soon as I started to launch the pages which have SQL queries being executed to fetch user data, the application was crashing with this error. I wonder if Tomcat 9 requires just a little bit more memory in general than Tomcat 8 (and I'm not suggesting that it DOES, only that it MIGHT) and you had been riding the line between "runnable" and "runs out of memory all the time". Are you able to run under Tomcat 8 and observe the total-heap-space versus used-heap-space over time to see how that compares to Tomcat 9? I wonder if Tomcat 8 was configured to provide enough heap space but your Tomcat 9 setup does not have that same configuration. When I set both values for Xms and Xmx as Olaf suggested, the application crashed right on Tomcat startup, so I couldn't access the URL at all. Also, below is the output of tomcat_stderr, How did you set those values? What did you set them both to? When you say "crashed right on Tomcat startup", what was the error message you got? The stack trace you posted was from a request processing error, and not during startup. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
On 14.04.23 04:55, pratik.kulka...@shell.com.INVALID wrote: Hi All, Thanks for your quick suggestions. As Olaf suggested, I tried to set the same values to Xms and Xmx; the application immediately crashes after Tomcat restart and I am not able to access it. I tried it with different values, but the result is the same. Regarding the memory leak, let me check on how to monitor an Oracle Apex application running on Tomcat, since this is something I have never done before. Here are a few ideas for this paragraph: As your application can't run with -Xms set to the limit, you have proven that your computer does not have enough memory to allocate for your requirements (maybe due to other applications taking it, maybe it's just due to low RAM to begin with. I'm not sure why this would surface after upgrading Tomcat, but maybe your settings are different in other aspects as well, or other applications now take more memory. (I'd recommend Xms==Xmx for all Java Server applications, to get the OOME quicker, rather than Sunday night at 3am, at random) If you just connect jconsole, you should be able to see a characteristic sawtooth curve of memory, going up, hinting at - not necessarily proving - memory leaks (it might also just indicate legitimate memory usage - it's a quick check: If the sawtooth is horizontal, you have a strong indicator that there's no memory leak) Typically, I don't really concentrate on the actual stacktrace of the OOME, as this is just what happened to require the last bit of memory, after everything else has been consumed. This *might* be the guilty code, but it might also just be a false positive. To me, OOME stacktraces have more often misled me than they pointed to the problem. A heapdump, with an indicator of what actually consumes your memory (and then judging if it's legit or not) helps a lot more IMHO. Olaf - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java Heap Space Error
Hi John, I don't think so, it returns around 50 rows. Also, this same application is working perfectly fine in Tomcat version 8.5, but it gives these errors on Tomcat 9.0.73. Thanks, Pratik -Original Message- From: john.e.gr...@wellsfargo.com.INVALID Sent: Friday, April 14, 2023 09:00 To: users@tomcat.apache.org Subject: Re: Java Heap Space Error Think Secure. This email is from an external source. Pratik, You're getting the error when executing a DB query. How many rows does it return? Could it be returning too many rows? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
Pratik, You’re getting the error when executing a DB query. How many rows does it return? Could it be returning too many rows? From: pratik.kulka...@shell.com.INVALID Sent: Thursday, April 13, 2023 9:55:06 PM To: users@tomcat.apache.org Subject: RE: Java Heap Space Error Hi All, Thanks for your quick suggestions. As Olaf suggested, I tried to set the same values to Xms and Xmx; the application immediately crashes after Tomcat restart and I am not able to access it. I tried it with different values, but the result is the same. Regarding the memory leak, let me check on how to monitor an Oracle Apex application running on Tomcat, since this is something I have never done before. Kevin and John- The heap dump is not generated, but I am looking into generating it. I have looked up a tool called visualvm and I am taking it on the server. Once I have those, I'll attach them here to see if those can be of any help. Chris - I see. So we already have installed a service and I tried to set the environment variable after we got the error. Is there a way for Tomcat to read the variables we set after installation? Also, what I meant by "when I access the application" is that it worked for a few requests; but as soon as I started to launch the pages which have SQL queries being executed to fetch user data, the application was crashing with this error. When I set both values for Xms and Xmx as Olaf suggested, the application crashed right on Tomcat startup, so I couldn't access the URL at all. Also, below is the output of tomcat_stderr, - 2023-04-14 02:47:53 Apache Commons Daemon procrun stderr initialized. 14-Apr-2023 02:47:55.483 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [maxSpareThreads] to [75] 14-Apr-2023 02:47:55.563 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.73 14-Apr-2023 02:47:55.563 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 27 2023 15:33:40 UTC 14-Apr-2023 02:47:55.563 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.73.0 14-Apr-2023 02:47:55.564 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2016 14-Apr-2023 02:47:55.564 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0 14-Apr-2023 02:47:55.564 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 14-Apr-2023 02:47:55.564 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jre1.8.0_361 14-Apr-2023 02:47:55.564 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_361-b09 14-Apr-2023 02:47:55.565 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 14-Apr-2023 02:47:55.565 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat9.0.73 14-Apr-2023 02:47:55.565 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat9.0.73 14-Apr-2023 02:47:55.566 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat9.0.73 14-Apr-2023 02:47:55.566 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat9.0.73 14-Apr-2023 02:47:55.566 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat9.0.73\temp 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat9.0.73\conf\logging.properties 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 14-Apr-2023 02:47:55.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m 14-Apr-2023 02:47:55.577 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
RE: Java Heap Space Error
racle.dbtools.apex.ModApex.doPost(ModApex.java:174) at oracle.dbtools.apex.ModApex.service(ModApex.java:102) at oracle.dbtools.http.entrypoint.Dispatcher.dispatch(Dispatcher.java:125) at oracle.dbtools.http.entrypoint.EntryPoint$FilteredServlet.service(EntryPoint.java:240) at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:73) at oracle.dbtools.http.forwarding.QueryFilteringRewrite.doFilter(QueryFilteringRewrite.java:90) at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47) at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64) at oracle.dbtools.http.forwarding.ForwardingFilter.doFilter(ForwardingFilter.java:68) at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47) at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64) at oracle.dbtools.http.cors.CORSPreflightFilter.doFilter(CORSPreflightFilter.java:66) at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47) at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64) at oracle.dbtools.http.cookies.auth.CookieSessionCSRFFilter.doFilter(CookieSessionCSRFFilter.java:77) - Thanks and regards, Pratik Kulkarni -Original Message- From: Christopher Schultz Sent: Friday, April 14, 2023 00:28 To: users@tomcat.apache.org Subject: Re: Java Heap Space Error Think Secure. This email is from an external source. Pratik, On 4/13/23 05:35, pratik.kulka...@shell.com.INVALID wrote: > This email concerns an error I encountered while using Oracle Apex with ORDS > 3.0.9 and Tomcat 9. Specifically, I receive a "Java heap space" error when > accessing the application. > > To troubleshoot the issue, I have tried to increase the maximum heap size of > the JVM using the -Xmx option in the CATALINA_OPTS environment variable. I > set this environment variable in the catalina.bat file and restarted the > Tomcat service, but the error persisted. > > I have also confirmed that the CATALINA_OPTS environment variable is set > correctly by running echo %CATALINA_OPTS% in the command prompt. > > I should note that I have two versions of Tomcat installed on the system - > 8.5 and 9. Everything works fine on Tomcat 8.5, but the "Java heap space" > errors are thrown on Tomcat 9. Definitely see the other replies as well, but I have a few comments. Setting CATALINA_OPTS on the command-line may not affect your running process, depending upon how to launch Tomcat. If you are using the Windows Service, for example, that environment variable does nothing after the service has been installed. You say the error happens "when you access the application". Can you be more specific? For example, doe sit fail on "first access" after a restart, or does it fail after some number of requests? Please look in any of these files for a full stack trace of the OOME: %CATALINA_HOME%/logs/catalina.out %CATALINA_HOME%/logs/*stdout* %CATALINA_HOME%/logs/*stderr* %CATALINA_BASE%/logs/catalina.out %CATALINA_BASE%/logs/*stdout* %CATALINA_BASE%/logs/*stderr* and post the complete stack trace. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
Pratik, On 4/13/23 05:35, pratik.kulka...@shell.com.INVALID wrote: This email concerns an error I encountered while using Oracle Apex with ORDS 3.0.9 and Tomcat 9. Specifically, I receive a "Java heap space" error when accessing the application. To troubleshoot the issue, I have tried to increase the maximum heap size of the JVM using the -Xmx option in the CATALINA_OPTS environment variable. I set this environment variable in the catalina.bat file and restarted the Tomcat service, but the error persisted. I have also confirmed that the CATALINA_OPTS environment variable is set correctly by running echo %CATALINA_OPTS% in the command prompt. I should note that I have two versions of Tomcat installed on the system - 8.5 and 9. Everything works fine on Tomcat 8.5, but the "Java heap space" errors are thrown on Tomcat 9. Definitely see the other replies as well, but I have a few comments. Setting CATALINA_OPTS on the command-line may not affect your running process, depending upon how to launch Tomcat. If you are using the Windows Service, for example, that environment variable does nothing after the service has been installed. You say the error happens "when you access the application". Can you be more specific? For example, doe sit fail on "first access" after a restart, or does it fail after some number of requests? Please look in any of these files for a full stack trace of the OOME: %CATALINA_HOME%/logs/catalina.out %CATALINA_HOME%/logs/*stdout* %CATALINA_HOME%/logs/*stderr* %CATALINA_BASE%/logs/catalina.out %CATALINA_BASE%/logs/*stdout* %CATALINA_BASE%/logs/*stderr* and post the complete stack trace. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java Heap Space Error
Pratik, > -Original Message- > From: pratik.kulka...@shell.com.INVALID > > Sent: Thursday, April 13, 2023 4:36 AM > To: users@tomcat.apache.org > Subject: Java Heap Space Error > > Hello, > > This email concerns an error I encountered while using Oracle Apex with > ORDS 3.0.9 and Tomcat 9. Specifically, I receive a "Java heap space" error > when accessing the application. > > To troubleshoot the issue, I have tried to increase the maximum heap size of > the JVM using the -Xmx option in the CATALINA_OPTS environment variable. > I set this environment variable in the catalina.bat file and restarted the > Tomcat service, but the error persisted. > > I have also confirmed that the CATALINA_OPTS environment variable is set > correctly by running echo %CATALINA_OPTS% in the command prompt. > > I should note that I have two versions of Tomcat installed on the system - 8.5 > and 9. Everything works fine on Tomcat 8.5, but the "Java heap space" errors > are thrown on Tomcat 9. > > I would appreciate any insights or guidance you can provide to help me > resolve this issue. Below are the details of the software I am using, > > > * Windows Server 2016 Datacenter > * ORDS 3.0.9 > * Tomcat 9.0.73 (which is throwing the error) > * Tomcat 8.5 (which works fine) > * Java 1.8.0_361 > > Kind regards, > Pratik Kulkarni The most effective thing to do is take heap dumps. If you enable -XX:HeapDumpOnOutOfMemoryError, you'll get one when the app crashes. If you want to be more proactive, you can use jcmd to take them while the app is running. Use something like Eclipse MAT to open the heap dump. MAT will make some educated guesses about what might be the problem. If that's not enough, look at the histogram. Sometimes the problem will be obvious from a single dump. "Oh! Why do I have 1.21GB of class Foo?" Sometimes you'll need to take a couple of dumps at some interval and compare them. In that case hopefully you'll see a particular class bubbling to the top of the histogram. Then you'll need to figure out why those objects are being kept alive. Right-click the offending class and choose "Merge shortest path to GC roots." You can also choose "List Objects with incoming references." john - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Java Heap Space Error
Also, is it possible for you to post the heapdump (if one was generated?) Kevin Huntly Email: kmhun...@gmail.com Cell: 716/424-3311 -BEGIN GEEK CODE BLOCK- Version: 1.0 GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E--- W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+) PGP++(+++) t+ 5-- X-- R+ tv+ b++ DI++ D++ G++ e(+) h--- r+++ y+++* --END GEEK CODE BLOCK-- On Thu, Apr 13, 2023 at 6:30 AM Olaf Kock wrote: > Hi Pratik, > > On 13.04.23 11:35, pratik.kulka...@shell.com.INVALID wrote: > > Hello, > > > > This email concerns an error I encountered while using Oracle Apex with > ORDS 3.0.9 and Tomcat 9. Specifically, I receive a "Java heap space" error > when accessing the application. > > > > To troubleshoot the issue, I have tried to increase the maximum heap > size of the JVM using the -Xmx option in the CATALINA_OPTS environment > variable. I set this environment variable in the catalina.bat file and > restarted the Tomcat service, but the error persisted. > > > > I have also confirmed that the CATALINA_OPTS environment variable is set > correctly by running echo %CATALINA_OPTS% in the command prompt. > > > > I should note that I have two versions of Tomcat installed on the system > - 8.5 and 9. Everything works fine on Tomcat 8.5, but the "Java heap space" > errors are thrown on Tomcat 9. > > > > I would appreciate any insights or guidance you can provide to help me > resolve this issue. Below are the details of the software I am using, > > 1. Make sure you have enough memory available (my recommendation is to > set -Xms to the same value as -Xmx, so that you see *immediately* (on > startup) if you don't have enough memory available. It doesn't help if > you need 3 hours or 3 days to run into this condition. > > 2. Check if your application has a memory leak (e.g. by monitoring the > memory consumption over time) > > Olaf > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Java Heap Space Error
Hi Pratik, On 13.04.23 11:35, pratik.kulka...@shell.com.INVALID wrote: Hello, This email concerns an error I encountered while using Oracle Apex with ORDS 3.0.9 and Tomcat 9. Specifically, I receive a "Java heap space" error when accessing the application. To troubleshoot the issue, I have tried to increase the maximum heap size of the JVM using the -Xmx option in the CATALINA_OPTS environment variable. I set this environment variable in the catalina.bat file and restarted the Tomcat service, but the error persisted. I have also confirmed that the CATALINA_OPTS environment variable is set correctly by running echo %CATALINA_OPTS% in the command prompt. I should note that I have two versions of Tomcat installed on the system - 8.5 and 9. Everything works fine on Tomcat 8.5, but the "Java heap space" errors are thrown on Tomcat 9. I would appreciate any insights or guidance you can provide to help me resolve this issue. Below are the details of the software I am using, 1. Make sure you have enough memory available (my recommendation is to set -Xms to the same value as -Xmx, so that you see *immediately* (on startup) if you don't have enough memory available. It doesn't help if you need 3 hours or 3 days to run into this condition. 2. Check if your application has a memory leak (e.g. by monitoring the memory consumption over time) Olaf - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java heap space error
On 01/09/2009 08:58, Suleyman Akpinar wrote: Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? You probably have a memory leak in your application. The first thing to check thoroughly, and I do mean thoroughly, is that you are properly closing all database connections and related objects. Don't assume that you have done so - check every location in the code carefully. Depending on which OS JVM version you have, (you didn't say - so we have to guess), there are tools you can use to examine the application's state and memory consumption. Google memory leak, jmap and thread dump p Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java heap space error
Many thanks Pid, Your solution seems very reasonable. I will fulfill your advice. Best Regards, Suleyman Pid wrote: On 01/09/2009 08:58, Suleyman Akpinar wrote: Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? You probably have a memory leak in your application. The first thing to check thoroughly, and I do mean thoroughly, is that you are properly closing all database connections and related objects. Don't assume that you have done so - check every location in the code carefully. Depending on which OS JVM version you have, (you didn't say - so we have to guess), there are tools you can use to examine the application's state and memory consumption. Google memory leak, jmap and thread dump p Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java heap space error
Thanks a lot it seems I also need to do the same. Regards, Ningappa Koneri mLifestyle | www.comviva.com -Original Message- From: Suleyman Akpinar [mailto:suleyman.akpi...@hititcs.com] Sent: Tuesday, September 01, 2009 1:49 PM To: Özkan Dülger; Serdar Gür Subject: Re: java heap space error Many thanks Pid, Your solution seems very reasonable. I will fulfill your advice. Best Regards, Suleyman Pid wrote: On 01/09/2009 08:58, Suleyman Akpinar wrote: Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? You probably have a memory leak in your application. The first thing to check thoroughly, and I do mean thoroughly, is that you are properly closing all database connections and related objects. Don't assume that you have done so - check every location in the code carefully. Depending on which OS JVM version you have, (you didn't say - so we have to guess), there are tools you can use to examine the application's state and memory consumption. Google memory leak, jmap and thread dump p Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail and all material transmitted with it are for the use of the intended recipient(s) ONLY and contains confidential and/or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken pursuant to the contents of the present e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Comviva Technologies Limited or its management or directors, are unable to exercise control or ensure the integrity over /of the contents of the information contained in e-mail. Any views expressed herein are those of the individual sender only and no binding nature of the contents shall be implied or assumed unless the sender does so expressly with due authority of Comviva Technologies Limited. E-mail and any contents transmitted with it are prone to viruses and related defects despite all efforts to avoid such by Comviva Technologies Limited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org