Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading the JRE used by ColdFusion

I have a ColdFusion 8.1 application. It gets heavy use and I see jrun.exe getting very high memory usage in the task manager. This is a 32-bit windows 2003 server. When Jrun gets around a gig of memory usage ColdFusion will stop responding at some point. The logs are a little vague, but I start to see garbage collection and heap errors in the ColdFusion log. I assume that the JRE is running out of memory.

I have the max JVM heap set to 1.2gig. After some experimenting, this seemed to be the biggest amount I could allocate and still have ColdFusion start ok. I realize that going to 64-bit might solve the problem, but that is not an option at this time.

I am considering upgrading the JRE (it is at v6.x dated pre-2008, though I don't know the exact version. I am using the JRE that came with ColdFusion 8.1. Has anyone gone through this? I assume it's just a matter of installing the new JRE and pointing ColdFusion to the new JRE directory in the ColdFusion server settings.

tia don

like image 835
Don Dickinson Avatar asked Jan 23 '23 16:01

Don Dickinson


1 Answers

it's EXTREMELY easy to do.

1) download the Java SE Development Kit and install it like normal.

2) open up the jmv.config for cf in a text editor, located in c:\coldfusion8\runtime\bin

3) comment out the existing java.home line with a by putting a "#" at the beginning of the line add a new java.home line below it pointing to your jvm installation.

As an example, my java.home and jvm.config look like this: java.home=C:/Program Files/Java/jdk1.6.0_11/jre

4) restart the CF services.

As a bonus, you can running JavaRa and free up some space by deleting all the old versions of the JRE.

like image 50
rip747 Avatar answered Jan 26 '23 04:01

rip747