Shows

Story

  Jun 2007

 
12
Posted on 06/12/07 under Web Development

Warning…Don’t Use the Windows Registry to Store ColdFusion Clients in Production

If you are a ColdFusion developer, you’ll know what I’m talking about. If you are not, either read this and learn about ColdFusion or wait until my next blog entry (which will be on the WWDC 2007 Conference).

Getting back to ColdFusion. In production, you should NEVER store your client variables in the registry (see image below).

CFMX 7 Admin Screen 01

Why? Simple. The more traffic you get, the more data will be written to in the registry and the potential to getting a “Registry Corrupt” goes up with every hit. Trust me. It happened to us. Many times, before we figured out that is what was causing the constant crashes.

We would rebuild our server, install everything and the site would stay up for 2 to 3 months, then we would start getting a “Registry Corrupt” error. This happened three times before the connection was made between ColdFusion client variables being written to the registry and the registry corruption error.

Thanks to Google for providing the answer we needed. The best thing to do is to create a new database (we created one in SQL Server…see image below).

CFMX 7 Admin Screen 02

I then created a datasource in the ColdFusion administrator and in the “Client Variables” screen, I mapped it to that datasource. (see image below)

CFMX 7 Admin Screen 03

The script then automatically created 2 tables call CDATA and CGLOBAL.

CFMX 7 Admin Screen 04

Within a few minutes, my CGLOBAL table had over 1000 rows. Make sure you set the purging of data accordingly so that your database does not grow too big.

Once you do that, you should clean out your registry with one of many scripts out on the Web for cleaning registry entries.

If you only remember one thing from this article, it should be this: DON’T PUT COLDFUSION IN A PRODUCTION ENVIRONMENT WITH CLIENT VARIABLES SET TO BE STORE IN THE REGISTRY.

For a good article on all sorts of ColdFusion variables, but especially on the corruption issue with Client variables, check out http://cfdj.sys-con.com/read/41649.htm

Good luck!

Cheers!
Marcelo Lewin
The Digital Media Dude

Comments

Name:
eMail:
Website:
Comments:
 

About The Author

Marcelo Lewin
Marcelo Lewin, a.k.a. The Digital Media Dude, started The Digital Media Dude in late 2006 as a blog, mainly, to write about new media. Then he created his first podcast, The Digital Media Dude Daily Tip now known as Digital Media Quick Tips which got picked up by iTunes in the Top 25. By late 2007, The Digital Media Dude became officially a network of shows and in early 2008, it was renamed to Pixel Heads Network.

With over 15 years of experience in the digital media industry, including gigs with NBC, Walt Disney Imagineering, Toyota and having a couple of "dot com" companies under his belt, he shares his knowledge throughout our shows.

He is married with his wife of 15 years and has 2 great sons. His hobbies include photography, videography, new media, technology, great food, great beers and just playing around with his kids.

Marcelo Lewin currently hosts 4 shows, blogs and makes presentations about new media all over, produces shows for other companies and is the "Chief Pixel Head" at Pixel Heads Network.
Subscribe

Make sure to subscribe today so you don't miss out on any new media news stories.

Stories     Comments