Hello,
I use a Asterisk-JAVA API program which on a random basis, calls a
Servlet, using Tomcat5, in order to set forwarding of calls through an Asterisk Server.
An hour after the program has been run, it gives an OutOfMemoryError - and hence the servlet is not called and hence CallForwarding is not set. But again randomly, it works but other times sends an OutOfMemoryError.
On the start of the program, I check the
Runtime.getRuntime().totalMemory() --> arnd 1.9 MB
Runtime.getRuntime().maxMemory() --> arnd 64 MB
Runtime.getRuntime().freeMemory() --> arnd 1.4MB After the totalMemory reaches 64 MB, and freeMemory is less than 34556 bytes, the java.lang.OutOfMemoryError is thrown.
Since I am completely new to both
JAVA and
tomcat, I would like to know how I need to proceed. I believe I must increase the maxMemory -- but how and where?
I start Tomcat5 using /etc/init.d/tomcat5 start command.
I run the JAVA program using Netbeans
IDE 4.1
Kindly guide me further. Any help appreciated.
Thanks in advance
Aparna