tags:

views:

38

answers:

2

Hi there.

We have a web application with load balancing in two machines with a java server(tomcat), ColdFusion and Apache in front.

Some time ago we notice that the cfregistry file have different size in both servers: 89Mb in one and 44Mb in other.

It's normal to have this size? It's normal they had the size so different?

Thanks in advance.

A: 

I believe that file is for Client storage under *nix.

You should configurate your app to use DB as client scope storage.

Is it normal to have different size? I think so.

Henry
A: 

ColdFusion Client Variable storage defaults to the Registry on Windows, and for Unix/Linux platforms it defaults to the cf.registry file. The reason is for out-of-the-box ease of use, but in production this is a silent killer that will slow ColdFusion down like molasses, and on Unix crash the server entirely when the cf.registry file becomes to large.

Effectively, ColdFusion is parsing, reading, and writing the file for every request that uses client variables (even if none are used in code but cfapplication's clientmanagement attribute is enabled). This is a bit like treating a flat file like a database. Its very IO intensive, and in my years of ColdFusion tech support for Allaire/Macromedia/Adobe, I've resolved many many cases of crashing/halting servers due to this issue.

In brief, stop ColdFusion, rename the exiting cf.registry file, and copy in its place a clean/new cf.registry file from any other ColdFusion server (even Developer/Trial edition is fine). Beware: If you copy in a new file without stopping ColdFusion, the server already has a copy of the original in memory and it will write it to the new cf.registry file upon shutdown, and you'll have the original problem again.

Even if you change the clientstorage mechanism to use a database or otherwise, you should still clean up the existing cf.registry file because ColdFusion will continue to parse it regularly as it goes through the process of expiring client variables that are outdated.

There is an Adobe technote for cleaning the registry of client variables. It runs as a chain where its kicked off in a browser, it removes 100 client variables, refreshes itself, and removes another 100. This could take hours. Don't use it when you have large client variable data in the Registry/cf.registry. Just clean the existing cf.registry files.

Finally, on Windows ColdFusion will rarely crash due to this problem. It will just keep limping along, slower and slower. On Unix/Linux it will only limp so far then crash the process.

Steven Erat
Thanks Steven. Your answer was perfect!
foxtrot