Question
JRun OutOfMemory Restarts
I've got a big async process that runs nightly on my CF8
server to rebuild my product database (should take 4-5 hours when
running properly), and it frequently (3-4 times per week) causes CF
to restart with a JRun OutOfMemory error:
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 16384000 bytes for GrET in C:\BUILD_AREA\jdk6_04\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?
#
# Internal Error (allocation.inline.hpp:42), pid=7024, tid=3756
# Error: GrET in C:\BUILD_AREA\jdk6_04\hotspot\src\share\vm\utilities\growableArray.cpp
The basic flow of the process is to do a few database queries to gather about 25,000 items, and then process each one in a grouped CFOUTPUT (need to group the query by product family, otherwise I'd normally use CFLOOP). Within each grouped iteration, I recycle a set of scalar variables for each family, so I'm not creating any persistent variables. I invoke a few CFCs via CFINVOKE to assemble some data, one of which does use Session variables, but my understanding is that all this would be considered one session. Then the data for that family is written to the database, and the loop continues to the next family.
What I don't understand is why my JRun memory usage continually creeps up and up over the course of the process. If I'm not creating persistent variables as the loop proceeds, what's accumulating there? I'm not caching any queries, I'm not building any accumulative variables, but the memory goes up and up till it causes a restart.
I'm running version 8,0,1,195765, with Java 1.6.0_04 using the following args:
-server -Dsun.io.useCanonCaches=false -XX:MaxNewSize=16m -XX:NewSize=16m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib
Can anyone suggest some steps I could take to get this thing running better? I've used the Server Monitor to watch the progress, although I can't use Memory Tracking (it eats the server up within minutes). Am I missing something really obvious in the Java configuration? Is the use of Session variables in the CFCs I invoke a bad idea?
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 16384000 bytes for GrET in C:\BUILD_AREA\jdk6_04\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?
#
# Internal Error (allocation.inline.hpp:42), pid=7024, tid=3756
# Error: GrET in C:\BUILD_AREA\jdk6_04\hotspot\src\share\vm\utilities\growableArray.cpp
The basic flow of the process is to do a few database queries to gather about 25,000 items, and then process each one in a grouped CFOUTPUT (need to group the query by product family, otherwise I'd normally use CFLOOP). Within each grouped iteration, I recycle a set of scalar variables for each family, so I'm not creating any persistent variables. I invoke a few CFCs via CFINVOKE to assemble some data, one of which does use Session variables, but my understanding is that all this would be considered one session. Then the data for that family is written to the database, and the loop continues to the next family.
What I don't understand is why my JRun memory usage continually creeps up and up over the course of the process. If I'm not creating persistent variables as the loop proceeds, what's accumulating there? I'm not caching any queries, I'm not building any accumulative variables, but the memory goes up and up till it causes a restart.
I'm running version 8,0,1,195765, with Java 1.6.0_04 using the following args:
-server -Dsun.io.useCanonCaches=false -XX:MaxNewSize=16m -XX:NewSize=16m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib
Can anyone suggest some steps I could take to get this thing running better? I've used the Server Monitor to watch the progress, although I can't use Memory Tracking (it eats the server up within minutes). Am I missing something really obvious in the Java configuration? Is the use of Session variables in the CFCs I invoke a bad idea?
