Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
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".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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