I’m running a Tomcat service and kept on getting outofmemoryerror.
I have tried increasing the heap size using 2 different methods and both failed:
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Xmx1024m;-Xms128m"
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMx 1024m --JvmMs 128m"
Still getting the same outofmemoryerror.
This is on a server and we have sufficient memory.
How often is this happening? I inherited a large web application that runs on Tomcat 5 on Windows Server 2003. It runs out of memory about every 28 days. Given the antiquated, undocumented nature of the code base, I just added a scheduled task to restart it once a week.