out of swap space
843829Dec 5 2006 — edited Dec 6 2006Hello everybody ,
I encountered an issue in regard to allocation of heap memory for the JVM. I have an t argets for starting and stopping mysql data base and tomcat 5.5 server. I am using java 1.5.09.
The tomcat start and stop targets are
<target name="start_tomcat_server" >
<exec dir="${local.dir}/Tomcat/bin/" executable="startup.bat" resolveexecutable="true" >
</exec>
</target>
<target name="stop_tomcat_server" >
<exec dir="${local.dir}/Tomcat/bin/" executable="shutdown.bat" resolveexecutable="true">
</exec>
</target>
This is the issue .
I start the data base and the mysql server from ant targets. When I try to stop the tomcat server from another ant target , I get the following two kinds of expections at different times.
1) [exec] Using CATALINA_BASE: C:\applications\local_repository\Tomcat
[exec] Using CATALINA_HOME: C:\applications\local_repository\Tomcat
[exec] Using CATALINA_TMPDIR: C:\applications\local_repository\Tomcat\temp
[exec] Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_09
[exec] Exception java.lang.OutOfMemoryError: requested 65536 bytes for u_char in C:\BUILD_AREA/jdk1.5.0_09/hotspot\src\share\vm\c\c1_Runtime1.cpp. Out of swap space?
[exec] Result: 1
BUILD SUCCESSFUL
2)[exec] Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_09
[exec] Error occurred during initialization of VM
[exec] Could not reserve enough space for object heap
[exec] Result: 1
I see the second exception more often.
I have the setenv.bat file for the tomcat 5.5.20 server as
set JAVA_OPTS= -Xms256m -Xmx1250m
I tried setting the environment variable for the ant build file , in the eclipse environment as
ANT_OPTS = -Xms256m -Xmx1250m
but it did not help.
Also I have tried chaning the VMargs for eclipse in eclipse.ini file , this did not work as well.
When I manually shutdown tomcat using shutdown.bat , it works fine.
I looked into a similar article on swap space. I was not able to find the solution.
Please help me out.
thanks,
Suchitha