I am not a big fan of storing CLIENT variables in the registry (I thought doing so was a hack when we first introduced CLIENT variables close to a decade ago, and still think that using the registry as a data store was a mistake). Actually, I am not a big fan of CLIENT variables altogether.
But having said that, a user contacted me with a problem. One of his servers contained so much CLIENT data that the registry had grown to several gig and Windows boot time was taking 50 minutes or so, and he wanted to know how to clear that data. Those numbers seem incredibly high, worryingly so, and I suspect that it’s not just all ColdFusion CLIENT storage. Nevertheless, I sent him this link to a ColdFusion script that we posted (back in 2005) that does exactly that, it purges registry keys (and can also list and create them for testing).

4 thoughts

  1. This script runs as a ColdFusion request and deletes client variable records in batches of 100, via a meta refresh per batch. Someone with MBs of client data may find that the application could run for minutes to hours, let alone GBs of client data.
    A shortcut would be to open regedit just delete the HKEY_LOCAL_MACHINE/Software/Macromedia/ColdFusion/CurrentVersion/Clients registry key and be done with it. Don’t be tempted to click on the + tree icon next to the Clients key since displaying gazillions of records could make regedit hang.
    ColdFusion MX 6/7 will automatically recreate the Clients key and store any new client data as subkeys when necessary. Don’t delete this key if using ColdFusion 5 or earlier because it contained some global values such as Last CFID and such.
    Client data is intended to expire anyway, so deleting the key causes no real problems.

  2. Is it possible for a network configuration to affect the storing of the client variables in the registry?
    I had a ColdFusion server running for about 3 years in datacenter A (with the default registry client storage).
    Then recently we configured and moved the same applications to a new server also (with the default registry client storage) in datacenter B. It took a little less than a month for the server to crash, so we rapidly configured a new server with the same configuration and then again, it took another 3 weeks for that server to crash. While monitoring the server, we noticed huge cpu usage spikes up to 100%.
    Then I became more aware of how ColdFusion stores client variables in the registry by default. When I checked my server, the ColdFusion/Client registry was so huge that I couldn’t opened it so I had to delete the whole client folder as you mentioned and configured a database for the client variables storage. After this, I noticed the CPU usage became normal.

  3. I went to the link for the Cold Fusion script and the link is dead. Do you have the script available else where? I want to try and use it to create an ODBC data source

Leave a Reply