[frs-101] Is there a way to kill and restart Jrun.exe when it reaches a certain memory usage or percentage?

FusionReactor itself does not directly support this. You could however create a CF page that runs as a scheduled task with the following content:

<cfset nativeMgr = createObject("java", "com.intergral.fusionreactor.trace.NativeManager")>
<cfset cpuUsage = nativeMgr.nativeGetProcessCPUUsage()>
<cfoutput>Current CPU usage is #cpuUsage*100# %</cfoutput>

Depending on the value of 'cpuUsage' you could trigger an arbitrary action, e.g. doing a "net stop 'ColdFusion MX 7 Application Server' && net start 'ColdFusion MX 7 Application Server'". You could do this also in Java with the Runtime class – see http://javaalmanac.com/egs/java.lang/Exec.html for more details.

Another approach would be to use a more sophisticated service wrapper to run JRun. We have made good experiences with the Java Service Wrapper from Tanuki, which is an Open Source tool available at http://wrapper.tanukisoftware.org.

See http://wrapper.tanukisoftware.org/doc/english/introduction.html#reliability and http://wrapper.tanukisoftware.org/doc/english/introduction.html#restarts to see how it could help you.

Issue Details

Type: Technote
Issue Number: FRS-101
Components: CPU + Memory, FusionReactor Settings
Resolution: Fixed
Last Updated: 20/Jun/07 2:26 PM
Affects Version: 2.0
Fixed Version: 2.0
Related Issues:

Comments are closed.