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.


Where is ColdFusion configured to store client variables? If it's configured to use "registry" (I recommend setting that to use cookies, personally) then it's entirely possible for one to be larger than the other if it is getting more traffic, or if returning visitors end up coming back more often on one server than the other and their client variables are kept around longer then one could become larger over time.

  • You're right, it was configured "system registry". Thanks Justin! – lfbn Aug 26 '09 at 9:57

By default, the ColdFusion Administrator is configured to store client variables in the registry. For non-Windows systems, ColdFusion emulates the Registry through the use of a file {CF_ROOT}/registry/cf.registry. This file is formatted with branches similar to how the Windows registry is set up

When an application makes use of client variables then with the default storage set to Registry, the ColdFusion server stores client variable data in this cf.registry file. In effect, the flat file cf.registry is treated as though it were a database. Every page request for that application will cause ColdFusion to parse the cf.registry file.

Normally, if client variables are not used, the cf.registry file is usually a few KB.

Client variables are better stored either in a database or as a cookie. Both of those are alternate options for Client Storage in the ColdFusion Administrator. Client variables are temporary by nature, and are periodically expired. I recommend 2 actions: 1) Change the default client storage to Cookie (or can use Database if apps make heavy use of client variables regularly), and 2) replace the large cf.registry file with a new "clean" cf.registry file from a default, clean install of CF (install the Developer edition on a Unix/Linux server and grab the cf.registry file off of it). Since ColdFusion keeps the file contents in memory, its best to do the cf.registry file swap when ColdFusion is stopped to avoid ColdFusion writing the contents of the file in memory back to the file on disk.

This will kill server performance if you continue logging Client Variables to the "registry".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.