4

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

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Don Dickinson
  • 6,200
  • 3
  • 35
  • 30
  • I don't think upgrading JDK will not give u any better performance.. since it is still limited to ~1.2GB heap as you said. – Henry May 04 '09 at 19:24

4 Answers4

7

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.

rip747
  • 9,375
  • 8
  • 36
  • 47
  • 1
    Some tips: if ColdFusion won't start after you change java.home in jvm.config, try running {CF_HOME}/bin/cfstart.bat on the command line to see what's wrong. In my case, to get CF 9.0.2 working with Java 7 I had to install the Microsoft Visual C++ 2010 Redistributable Package to get MSVCR100.dll. ¯\\(°_o)/¯ – Shane Oct 23 '14 at 22:08
2

Adobe has a Knowledge Base that covers issues like this. Check out http://www.adobe.com/go/2d547983 for instructions.

Sean Corfield has an article that provides some info on using Java 6 with ColdFusion 8 here: http://corfield.org/blog/index.cfm/do/blog.entry/entry/Java_6_and_ColdFusion_8

As long as you install 1.6.0_10 or greater, you should be fine. You might check out ColdFusionBloggers.org from time to time in case other JVM issues come to light in the future.

Adrian J. Moreno
  • 14,350
  • 1
  • 37
  • 44
0

Consider moving Java 7. Java 7 has the G1 Garbage collector which is better at memory deallocation.
If you are having out of memory issues it could be because

  • functions are not using var or local scope
  • <cfdump> is used in a production system
  • Sessions are too large or are not set to expire in a reasonable amount of time
  • Queries are way too large SELECT * can cause that.
  • Excessive number Query of Queries.
  • The site is connecting to a slow database. Resources are held until the DB returns data
  • DSN has the data buffer set to more than 64k
  • James A Mohler
    • 11,060
    • 15
    • 46
    • 72
    0

    You didn't specify whether or not you were using the stand-alone server instance or a multi-server configuration. If you're getting a heavy volume of traffic and have a dual core machine with a lot of physical memory, I would consider looking into the multi-server set-up for CF8 and putting together a cluster with load balancing. This will help to distribute your traffic across several instances of CF8 and, assuming you have a beefy server, make better use of the physical resources that you have available.

    -Rick