I have tomcat 6.0.20, apr 1.2, jdk 1.6.0_15 with mysql 5.1.38 working on a rhel box with 4 GB of RAM. It has one jsp / servlet application with 5 users, one struts 1.2.0.9 with 64 users on it and one struts 2.0 application with 35 users on it. Users of struts 2.0 record every second, about 900 records per day. I also use toplink to save in the last two applications. I announced that all objects that do not have a null reference in the code applied production values ββfor the configuration files from struts 2 and tomcat. Applied thread caching in mysql, shortening wait_timeout and interactive_timeout is equivalent to tomcat session timeout. Enlarged file descriptors in Linux. Recycled requests. I studied the stream dump, looked at the gc statistics, the changes applied above based on this,
YET is still encountering the java.lang.OutOfMemoryError error.
at different times it is for different things, sometimes its Servlet.service (), sometimes its image.servlet, sometimes it is jasper that calls it.
extremely frustrating, as errors are not constant, but continue to change over time
Any help please would be greatly appreciated !!!
JAVA_OPTS = -server -XX: + UseConcMarkSweepGC -XX: + CMSClassUnloadingEnabled -XX: + CMSPermGenSweepingEnabled -XX: + CMSParallelRemarkEnabled (tomcat manager reports 34 mb empty, so mx didnβt use perms
persistence.xml
<property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/dbname?autoReconnect=false"/>
server.xml
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="2000" redirectPort="8443" compression="on" compressableMimeType="application/octet-stream,text/html,text/xml,text/plain,application/x-javascript,image/gif,text/css,image/gif,application/vnd.ms-excel,application/pdf" enableLookups="false"/>
context.xml
<Context reloadable="false" delegate="false" privileged="false">
java tomcat permgen toplink struts
sam
source share