Site Contents
My Blog
Wireless & Networking
Hardware & Gadgets
Software Picks
Contact Me

My Articles & Papers
Flex Performance
Server/Client Under the Hood
Multiple Instances of CFMX
Multiple Instance Config
NLB with ColdFusion
Clustering CFMX for J2EE
Multi-Tier Hardware LB w CFMX
Cisco CSS & Coldfusion MX
JRun 4 Jini based Clustering
WiFi Growth

2ID Tacweb

Other Hobbys
Body-For-Life Challenge

Personal Projects
Family Pool
Deck Gate



Welcome to, the personal homepage of Brandon Purcell. I started building many, many years ago to share information I ran across everyday in my role as a Support Engineer and Consultant for Macromedia/Adobe. As a support engineer and consultant I always had a lot to blog about but as I moved into managment roles at Adobe my technical content dwindled.

I currently work as the Director of Technology for Universal Mind. My primary responsiblity is managing the SpatialKey project and it has been an amazing experience. I have been spending a lot of time working with Amazon Ec2 and will share my experiences through the blog in the future. I truly believe that Cloud Computing is the IT platform of the future and we have built the SpatialKey architecture on top of Ec2.

Viewing Individual Entry / Main
March 25, 2004

The JRun Closed Connection error can cause a lot of frustration but if you understand how to debug and find the issue that is causing it, then you can resolve the problem quickly. The JRun Closed Connection error is caused by an issue that occurs in the JVM that causes the JVM to close the socket that is open from the external webserver connector (IIS, Apache, Iplanet) to JRun. The JVM problem can occur due to several different issues

  1. outOfMemory or the JVM approaches the max heap
  2. Native code in a CFX or COM objects causes an error in the JVM

The memory condition can occur in several different cases

  1. If debugging is left on in production with CF (make sure you have it turned off in production not just masking the IP's)
  2. Large resultsets are returned from the database taking up a significant amount of memory (reduce the size of database results you are returning)

Diagnosing the issue: In order to diagnose this issue there are several areas to start. By turning on metrics and JVM Verbose GC output you can monitor the memory and find out if memory utilization is the problem. In some cases the memory spikes very quickly and comes back down. A large recordset returned from a query can cause this behavior. The recordset will populate into memory and GC will clean it up quickly. If the size of the recordset pushes the heap beyond the max heap you will see a problem. Although you may not see an outOfMemory error everytime. Any connections that were in use during this spike will get a JRun connection closed error. If you look in the webserver connector logs you may find connection reset by peer errors as well.

Also review all of your logs for long running pages and errors in the Application.log. If you have a number of errors correct each issue also identify and fix any long running pages.

You can also provide a better user experience by modifying the page that displays when the error occurs. Without modifying the connector errorurl the user will get a white HTML page that says "JRun Connection Closed". You can replace this with an HTML page that just asks them to refresh or place javascript in the page that will refresh automatically. In either the httpd.conf or jrun.ini file modify the errorurl to point to an html page on the webroot of the web server.

For example with IIS you need to uncomment the #errorurl parameter and set it to the html page

While I have not covered every possible issue that can cause JRun Connection Closed errors I have at least provided some quick debugging steps. I will continue to update this entry as I find more approaches for debugging this problem.


We are experiencing this problem! We have a COM object that I think may be causing the crash. It worked fine in CF5.0. How can you determine if its the COM or other long running templates?

I would load test the app and use the steps in this posting to monitor

We are having a closed socket error that doesn't seem to be alike any error pattern I have found at the blogs and forums...

We get:

debug DMGC collected 0 caches, 0 remaining. debug DMGC collected 0 destinations, 1 remaining. debug DMGC collected 0 caches, 0 remaining. debug MM GC collected 0 messages, 0 remaining. debug DMGC collected 0 destinations, 1 remaining. debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket debug webserver closed it's socket

And after this "webserver closed it's socket" starts usualy the website goes realy slow and we have to reestart the whole thing (IIS, Jrun). Sometimes I have the feeling that the problem it at IIs, but I feel that it could be application related, metrics.log shows no significant increase of RAM use. What in heaven might that be, any clues?

I have an issue where 4 load balanced CF6.1 servers all throw "Jrun Connection Closed" errors (and corrosponding 503's in the IIS logs) at exactly the same time. I'm convinced that this has something to do with the MSSQL server, but no matter where I look I don't see anything in the logs that even remotely points the way at this. The CF logs contain no entries anywhere near the time this happens, SQL continues to work just fine (no exceptions there either). I'm a bit stumped as to how to debug this, there seems to be no rhyme or reason as to when it happens although I do know that it is load related (only happens on heavy days for us).

Thanks! -chris


  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Subject Archives
Amazon EC2 (15)
ColdFusionMX (155)
Corvette (3)
Flash Lite (4)
Flash Media Server (5)
Flash Player (3)
Flex (39)
General Web Dev (14)
HDTV (3)
Jboss (1)
Jquery (2)
JRun (59)
Max 2003 (3)
Other (33)
PC Hardware (16)
Software (17)
SpatialKey (7)
Wireless (8)
Working Out (1)

RSS Feed
Feed Listing
Corvette - October 2005 brandonpurcell's Corvette - October 2005 photoset
Macromedia ColdFusion MX

Featured Links
Stock Footage
Page Render Time:0 user:""