[Looking for Charlie's main web site?]

Here's what I think of CF8...what do you think?

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I don't know if that title sounds controversial (I don't mean it to), but if anyone indeed would like to hear my take on CF8, you can check out a couple page interview I did with Michael Smith (of CFUnited and TeraTech fame), which was posted yesterday on the CFUnited site.

I don't know if it's what most may expect. I don't recount all the new features, nor do I pontificate even about the marquis ones. Rather, I focus on some areas of interest for me (and others), and I offer several resources for finding additional info that I hope readers will find useful (and perhaps uncommon).

Interviews are often challenging: where do you draw the line in discussing a topic? and how do you guide the interview to say all that you might? and what might you say with just a little more time?

Please let me know what you think, here, whether you learn something, or think I forgot something important.

How would you run code against multiple CF versions at once using IIS on XP?

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you use IIS on XP, have you ever wished you could put your code in one directory and run it against different versions of CF, easily. In this note, I show you how.

Someone asserted on a list that some code failed as of CF8, but I tested it against 8, 7, 6, and 5, and it worked the same in all. Hearing that, someone else asked, "Charlie, are you running all those on the same machine or on vmware?"

I assume that the reader, like many, is using IIS on XP, which doesn't let you have more than one web site, which might seem to make it impossible, though some may know the tricks I'll mention.

Of course, folks running on Apache, or IIS on Win2k3 or Win2k Server, would just say, "create different web sites, and install each CF version into a different web site".

Fair enough, but how do you solve this using IIS on XP (or Wink2 workstation), if you can't have multiple sites? That's what I explain below.

Before I go on, though, let me make an important for those who may not be aware: you certainly can run multiple versions of CF on a single machine. They each get installed in their own directories, with their own JVM (as of CF6). The challenge is just to avoid port conflicts and external web server conflicts.

But why not just use the built-in web server?

Sure, if you use the built-in web server available in CFMX since 6, then you can indeed run multiple CF versions each with their own web docroot without conflict.

But that's not the point here. That would cause each CF instance to have its own wwwroot, and you'd have to put your code there to run it on that version.

And I have even explained in a recent blog entry that you can get around that using virtual mappings in the JRun web server, pointing to the shared document directory. But sometimes you really want to use IIS for some reason, or you just don't want to have to remember to use the right port and virtual directory name configured for the built-in web server.

But you can have multiple web sites in XP, if you know how...

Yep, some will want to note that you can indeed create multiple web sites in XP, if you use the right tools. I've written about such tools before. It's just that you can't run them at once, so you have to enable/disable each time you want to run the test. To me, that more of a hassle than just doing the one-time configuration which I discuss below.

So how do you configure things using IIS on XP?

OK, I hope I've headed off complaints some may have. Oh, well, I should add one more: what I'm about to show you is definitely not supported by Adobe. Some might even argue against doing it. Certainly, if you have problems with things while trying to work this way, they're going to tell you to use a vanilla setup.

Still, it's worked for me for years. In fact, I first wrote about it in a CFDJ article back in Sep 03 (co-authored with Jeff Houser). That was written in the timeframe of people moving from CF5 to CFMX and wanting to set things up this way, but the concept still applies even for those moving from 7 to 8, or 6 to 7. It also mentioned using the same approach for running against BD as well, which means it would apply also to Railo and Smith, etc.

Finally, since writing that article, I've also realized a few things I could have added to the article, which further motivates me writing this entry.

How I set things up

So, as explained in the article (which shows you the actual steps in IIS), I configure different IIS virtual directories called _cf5, _cf6, _cf7, and _cf8. I set each to points their CFM extension (and related CF ones) to the appropriate web server extension that would be used if I'd configured each server to work with IIS (like C:\CFusion\BIN\ISCF.DLL for 5, C:\CFusionMX\runtime\lib\wsconfig\1\jrun.dll for 6, and so on).

More important, I have them all point at the same, single document root (in my case, c:\inetpub\wwwroot). That allows me to then run code in that single directory against different editions, using a url like http://localhost/_cf5/somefile.cfm, or http://localhost/_cf7/somefile.cfm, or the default http://localhost/somefile.cfm goes against CF8.

Note that you must run the web server connector for each CF edition from CFMX and above, since it only builds those jrun.dlls (I mentioned above) if you do that. See the CF docs ("Installing and Configuring ColdFusion" to learn how to run that, even after CF is installed, if you installed it using the built-in web server instead.

Before you do, though, as explained in the article, be sure to save off the path to the DLL for .cfm file extensions, as running the configuration tool will wipe over the previous path.

Some concerns using the CF Admin in this setup

There's something else to take note of about using the CF Admin (/cfide/administrator/index.cfm) when you set things up this way.

It has to do with whether, when you install each version, you tell CF to install using the built-in web server or using IIS.

In the former case, CF will put that version's CFIDE directory (and all its related files) into the wwwroot for that built-in CF server, such as c:\coldfusion8\wwwroot\ for CF8, or c:\cfusionmx7\wwwroot\ for CF7.

In the latter case (if you tell CF during installation to use IIS), then CF will place those files into the IIS docroot you name. Assuming you would always choose that c:\inetpub\wwwroot directory, that means that its CFIDE directory will be replaced with whatever is the last CF version you install.

And that means that even if using the virtual directories above, they'll all point to the last CFIDE version, which won't work (the CF Admin can only run in the version for which it's created).

Either way, you can solve this by creating yet another virtual directory, for CFIDE, inside the version-specific virtual directories above.

So if during the installation of 6, 7, or 8 you told CF to use the built-in web server, you'd point the new CFIDE virtual directory to the builtin web server's CFIDE. For my _CF6, for instance, I'd create a CFIDE virtual directory within that to point at c:\cfusionmx\wwwroot\CFIDE.

If instead you choose to install each version using IIS, then just as you needed to save off the file extension's path to the web server DLL, you would similarly need to remember before each install to save off a copy the CFIDE directory for the previous release. This is especially key for CF5, since there is no concept of a built-in web server for that.

Back when I installed CFMX 6, before doing so, I copied the CFIDE directory to call it CFIDE5 instead. (Sure, you could do a rename, but only JUST before you installed, in case you need it.) Then I created the CFIDE VD within the _CF5 VD to point to that.

It may be worth noting here that if you do install CF 6/7/8 using the built-in web server initially, and then use the web server configurator tool to then connect them to IIS, that does not move the CFIDE from the built-in web server root to the IIS docroot. So again you will need to point your CFIDE virtual directory to that CFIDE in the built-in web server.

Why not just use the built-in web server for the CF Admin?

Of course, you could just use the built-in web server to access the Admin instead, even if you are otherwise running code via IIS.

And going back to the original writer, you could indeed also do this using VMWARE. (I've written about how versions of it and Virtual PC are now free.) It might be overkill, though. Again, you don't need to worry about running multiple versions of CF on a single server. It's all just about avoiding port conflicts and potential external web server conflicts.

That's what this has been about all about: how to run all your code via IIS against multiple version of CF, all from a single directory.

Conclusion

Did this help you? Let me know. Did I forget something? Got a complaint? (People seem to love that opportunity. Go for it.) I hope it has helped some of you. It's certainly helped me, and others who I've shown it to.

Main CF page now makes free CF Developer Edition more prominent

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you haven't noticed, the main CF page now makes more prominent the availability of the free Developer edition. Woo hoo. :-)

I had made the suggestion to Tim, Jason, and Ben back on 7/31. I don't know if it was really my suggestion that made it happen, of course. Anyway, I felt that the new CF8 front page, which listed only the buy/upgrade/trial options, was a missed opportunity to make it clear to folks that there was indeed a free developer edition.

Many have lamented that some might never realize there was one, especially those a little skeptical or just not currently fans. Sure, the availability was listed on the downloads and product editions pages, but what if such folks never took that step?

So, it's a move in the right direction, and thanks for listening (to whoever), Adobe! Let's hope more newcomers notice it. (BTW, the arrow in the screenshot at left is of my own adding. It's not on the Adobe site!)

Livedocs for CF8: They're here, they're faster, with commenting working, and more

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I want to share some news with those who may have noticed recent challenges with the Adobe LiveDocs, especially for CF8, and a challenge in commenting in them. All is resolved now. I've been working in the background with the Adobe gent in charge of this (who may prefer I don't share his name) and he's been great about attending to and resolving these. There's also good news: they seem faster (to me) than the CF7 livedocs.

First, you CAN now get to the livedocs...

As some noticed, there was a brief time in recent days when you couldn't get to the livedocs at all (for CF8 or otherwise). You'd get stuck in a loop on a main docs page. That's since been fixed.

But note that you may need to take a (good) detour...

But about that "main docs page", yep, it's worth noting that trying to go livedocs.adobe.com will no longer send you to the livedocs front page but rather will go instead to a new page I'll call the main Adobe docs page.

There, you have to pick which doc you want to see from a select control, and further the page you're taken to offers both a link to the livedocs and to the PDF docs. (It was the link from there to the livedocs that was broken last week, sending you right back to this page.)

Now, some may be annoyed that they get sent here. I just want to get to the livedocs. Well, if you know the URL for your product, you can, such as for CF8 or CF7.

There's more than the livedocs: PDF; and the print versions you can buy

But I do myself like that they've sent people to the main docs page first, if they don't know a short-cut. So many people never knew of the PDFs. They're nice to have sometimes.

Also, that page offers a link to the printed docs (for now, only the CF7 docs are for sale, as the CF8 docs may not be available until late August).

I've blogged about buying the printed docs before. I think for many it's the best $50 bucks they'll spend for 2500 pages of content.

New look for the CF8 docs...and faster

If you do go to the CF8 livedocs, you'll find that they have a new look compared to the CF7 docs. Also, at least it seems to me, they're much faster.

Yes, they're still a framed interface, but that's not the end of the world--and if you need them all as one, remember the PDFs, and the HTML form available on your machine where CF is installed (C:\ColdFusion8\wwwroot\cfdocs\htmldocs on my machine).

Some docs retired...

I will point out that sadly, one book from the CF7 livedocs doesn't seem to have been updated for CF8, the "Getting Started Building ColdFusion MX Applications". Again, this was a hidden gem that I think many missed and would get great value from. If you're moving from 5 or 6 to 8, please do take time to read this 150 page guide. It's really quite good.

Also, two that were available in HTML/PDF form (not on livedocs) that also seem to have been retired are the "CFML Quick Reference" and the awesome 60-page "Migrating Applications to ColdFusion MX 7". Again, if you're skipping 7 (or used it but never really took full advantage of it), check out those docs.

And yes, Virginia, you can now make comments...

Finally, and perhaps best of all, some may have noticed if they DID get to the CF8 livedocs that for some reason, the ability to comment was gone. That, too, is finally fixed. Thanks, Randy! :-) (Doh! Ok, I'll use his first name. He knows who he is, and some of you. If he wants to speak up and identify himself, I'd welcome it.)

So get out there and start commenting away. Let's share what we learn as we pour through the CF8 docs, whether online, in print, in PDF, or in HTML.

I'll have a little more to share about the commenting system and some related features in an upcoming note.

Testing code in CF8 and earlier releases--in the same code directory

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
As folks contemplate moving to CF8 from 6 or 7, they may know that they can run these releases alongside each other--as long as you use a separate web server (or web site in servers that support it) configured to hand CFML requests to each CF server. Since CF6, CF has included a built-in web server to help with this very issue, especially on servers (like IIS on XP) where you can't have more than one site.

But what if you want to test some code in a single directory against one or more editions? Is that possible? I mean, let's say you have CF7 setup against IIS, and your code is in the c:\inetpub\wwwroot? And you've installed CF 8 for testing using its built-in web server, which runs on port 8500 (or whatever you chose) and finds its code in, for instance, c:\coldfusion8\wwwroot.

How would you have CF8 look at the code you've long had running in the IIS root? (or Apache, or a virtual directory you've setup for use by either external web server). Do you have to move the code around among these directories to test it on different versions of CF? No, you don't.

The trick is in the jrun-web.xml, which you can find in cfusionmx_home]\wwwroot\WEB-INF\jrun-web.xml . You can add a new "virtual-mapping" entry there, naming a new "alias" which points to files outside the normal CF-based wwwroot:

<virtual-mapping>
<resource-path>/inet/*</resource-path>
<system-path>C:/inetpub/wwwroot/</system-path>
</virtual-mapping>

So now a request for http://localhost:8500/inet/ will look instead in the inetpub/wwwroot, or wherever you point it.

Update: Note that when you use the resource-path, it's case-sensitive, even on Windows, so http://localhost:8500/INET/ would not be the same.

Of course, this works also if you set up CF8 to run via your built-in web server, but setup CF 7 or 6 to run on its own built-in web server. And of course, if you're savvy enough you may figure out how to run things so that you can run all 3 using an external web server.

There are a couple of potential challenges with this technique. For one thing, if your code has hard-coded references (such as hyperlinks, images, CFLOCATIONS, etc.) to either run on a particular host (without the port) or at a particular root-relative path, then this introduction of a new port or the /inet/ alias may hamper it working. That's not a "CF" problem but rather a coding one. Your stuck then.

But it certainly works well for testing individual files. I do it all the time and have for years. Indeed, I'll share, for the sake of posterity, that this modifying of the jrun-web.xml is something I first wrote about back in 2002, but many may have missed when such info was being shared.

I'm going to go back and reprise a lot of those "oldies but goodies", spread across a few different blogs I've had over the past several years. I think I'll call them "carehart classics".

My new Adobe DevNet articles on the CF8 Monitor

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you'd not seen it, there are a slew of new CF8 articles on the Adobe CF Developer Center, including one I've done that's the first of a 4-part series on the CF8 monitor. The first both introduces the monitor and focuses on its uses first in development:

ColdFusion 8 server monitoring - Part 1: Using the Server Monitor in development

It's 8 pages printed, so lots of info there. I hope you'll get value from it. Since there's no feedback mechanism there, I'd appreciate if you'd share comments here of what you think of it. We writers get precious little feedback on our work, most times.

For now, it's even listed as a front-page article on the CF8 Dev Center. (FWIW, note that the URLs say "devnet" while the site itself uses the phrase "Developer Center".)

Future articles in my CF8 Monitor series will focus on using the monitor in production, then using the multi-server monitor, alerts, and snapshots, and finally several miscellaneous features and tips in part 4.

I should say finally, since many know I've talked a lot about FusionReactor and SeeFusion in the past, that, no, I don't think the CF8 monitor is a death knell for those tools (nor do I think the CF8 debugger will kill off FusionDebug). There's a place for both (especially if you're not yet on 8, and even afterwards possibly), and since the monitor is only in CF8 Enterprise, that especially keeps the other monitors in the running. I've written a more complete discussion of my perspective on these things:

Scorpio Debugger and Monitor: What's it mean for FusionDebug, FusionReactor, and SeeFusion?

Now, about it being in Enterprise, that's something I couldn't say in either my past entries or even in the current article on the DevCenter, as those were all written before the final release of CF8. I'm sorry if they read as if everyone using CF8 could use them. I really had no way to say otherwise.

That said, with the CF8 monitor being free in CF8, and especially with it giving us access to some awesome new info (which even the other monitors could now provide access to), it's worth learning what's possible. There's a lot more to it than you may think.

See the other entries I've done on the monitor. Some of them have info I couldn't fit into the DevCenter articles, or that may not be published for a few weeks.

CF8 Admin Changes: A compendium of new/changed features since 7.02

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.

Are you aware of all the changes that have been made in the CF Admin as of CF8? You may have seen mentions of little changes in CF8 (indeed, I've done a full hour user group talk on hidden gems), and while I mention some changes in the CF8 Admin (as I or others have noticed them), I've not seen any definitive list (from Adobe or the community) of all the changes (small and large) that might have occurred in the CF Admin interface. I figured I'd take up that challenge.

I've gone through and compared the CF Admin between 7.02 admin 8, and found changes that reflect:

  • new major features you've probably heard about (whether to enable "per app settings"; limits on the number of cfthread threads; options to enable/control the new interactive step debugger; support of the new Server monitor; support of per-user access to the Admin and RDS)
  • new minor features you may have missed (options to "disable CFC type check" and "disable access to internal CF java components"; options to limit the number of simultaneous requests from Flash Remoting and web services clients and CFC methods called from a URL; options to set request queue timeouts and set jrun request limits; new options to control mail server authentication; new db drivers; new option to log activity on enterprise databases; new option to perform a validation query when a connection from the pool is first used/reused; new ajax debugger window; ability to pause a scheduled task; 3 new flex-based gateways; minor additions in CAR file creation)
  • realignment of related settings (request tuning settings)
  • renaming of various pages and settings

Here are all the changes I could find, discussed per page:

A. Server Settings Section

Settings Page

  • "Maximum number of simultaneous requests", "Maximum number of report threads", moved to new Request Tuning Page
  • "Maximum size of post data" moved to bottom of this same page
  • New "Enable Per App Settings", "Disable CFC Type Check", "Disable access to internal ColdFusion Java components", and "Watch configuration files for changes" (latter for WebSphere ND)

New Request Tuning Page

  • (Enterprise only) Besides holding the "Maximum number of simultaneous requests" setting (renamed here in CF8 as "Template" requests) moved from the old Settings page, this page now permits setting limits on number of simultaneous requests from flash remoting and web service clients, as well as CFC function requests (not calls to CFC methods from CFML but those made via a URL, such as from a browser or Ajax client, etc, when not using ?wsdl)
  • Besides holding the "Maximum number of simultaneous report threads" setting (renamed here in CF8 to add "simultaneous") moved from the old Settings page, this page also permits setting limits on number of simultaneous CFTHREAD threads
  • (Enterprise only) Page adds 2 new "Queue Timeout" settings
  • (Enterprise only) Page adds 2 new "JRun Master Request" limits

Mail Page

  • New Username and password fields to hold SMTP server authentication info (previously, had to know how to add it to the mail server name using username@password:servername in the mail server field). Use of password field offers protection of password from someone watching over your shoulder.
  • New "Connection Timeout" and "Enable SSL Socket connections to mail server" and "Enable TLS connection to mail server" options, each permitting greater security and control over authentication to SMTP servers (particularly Google mail servers)

B. Data & Services Section

Data Sources Page

  • New driver types: "Apache Derby Client", "Apache Derby Embedded", to support the newly available Apache Derby database, and "MySQL 4/5" (in addition to existing MySQL 3) and "PostgreSQL"
  • In "Advanced Settings", new "Log Activity" option (to log database activity to DB) for Enterprise drivers (SQL Server, Oracle, Informix, Sybase, and DB2).
  • In "Advanced Settings", new "Validation Query" option (called when a connection from the pool is reused), available for use with all driver types

Verity K2 Server Page

In "Advanced Settings", new option to enter K2 Admin Username and Password.

C. Debugging & Logging Section

Debugging Output Page

  • Page name changed from just "Debugging Settings" (due to addition of new "Debugger Settings" page listed below).
  • New "Enable AJAX Debug Log Window" option, which allows display of the AJAX debug log window when the cfdebug flag is passed in the URL (also relies on IP address settings to control who sees this)
  • "Enable Debugging" option renamed to "Enable Request Debugging Output"

New Debugger Settings Page

Enable, configure, and control interactive step debugger in Eclipse.

Scheduled Tasks Page

New option to pause a given scheduled task (new button in list of buttons to left of each scheduled task)

Systems Probes Page

Field for "Notifications Sent From" renamed to simply "E-mail".

Code Analyzer Page

Changed to list CF8 tags and functions in "Advanced Options" page.

D. New Server Monitoring Section

(Enterprise only) Offers links to the new Server Monitor and Multiserver Monitor.

E. Event Gateways Section (used to be Enterprise-only)

Gateway Types Page

New Flex-based gateways: "DataManagement", "DataServicesMessaging", "FMS"

F. Security Section

Administrator Page (renamed from "CF Admin Password" page)

(Enterprise ony) Offers new interface to use either a single Admin password (as before), or separate username/password (per authorized admin user, as enabled in new "User Manager" page listed below), or no password required at all

RDS Page (renamed from "RDS Password" page)

(Enterprise only) Offers new interface to use either a single RDS password (as before), or separate username/password (per authorized RDS user, as enabled in new "User Manager" page listed below), or no password required at all

Security Sandbox/Resource Security Page

"CF Tags" and "CF Functions" tabs for adding/editing a sandbox have been changed to list CF8 tags and functions.

New User Manager Page

(Enterprise only) Enables adding users who should be given access to either RDS, CF Admin, or Admin API functionality.

G. (Enterprise only) Packaging & Deployment Section

ColdFusion Archives Page

When adding/editing an archive, the popup window that is shown offers several sections, and the following changes have been observed:
  • Server Settings: "Locking" section has been removed, while "Watcher Settings", "Server Monitor Settings", and "System Probes" have been added
  • New "Web Services" settings page, with provided "pre-restore" and "post-restore" lists

(Enterprise only) J2EE Archives Page

When adding/editing an archive, there is a new "Previous Serial Number (if upgrade)" option.

Where to learn more

To find out more about these changes, see the online help available in the CF Admin, available on each admin page.

Or see the ColdFusion documentation manual, "Administering and Configuring ColdFusion 8", available at CF docs page.

I realize that some reading this will be moving from CF 6, 6.1, 7, or 7.01. I'm afraid I can't detail here all the changes between those releases. I have, however, got a day-long class I offered at CFUnited on "New in CFMX 6/7: What you may have missed", where I do outline changes in each of those releases (and intervening updaters). If you're interested in taking that class, drop me a note or leave a comment here. I am thinking of offering it as an online class (and plan to do the same regarding all changes in CF8--outside of the Admin). Hope all this helps others.

CF 8 Hidden Gem: Incredible Info from the Server Monitor, with Zero Overhead

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
OK, I'm playing a little trick here, and it's the first time I've ever felt the need to do it in 5 years of blogging (or 10, depending on how you count it). Anyway, I don't have any new content here.

It's just that I just noticed that the traffic for my 2nd blog entry on server monitoring was much lower than the first, yet it was posted about the time--and is just as important, if not more so for most people, than the first. So I've used a different title here to try to catch your attention. Looks like it worked! :-)

Please do go read the other, if you have still not. And let me know what you think, if you did. I'd also like folks to confirm what I'm seeing, as it seems almost too good to be true.

What's in a title? Everything, it seems

I can't help but fear that the title I used, "CF 8 Hidden Gem: Using the Server Monitor even without "starting" any collection...yes, TANSTAAFL", just confused people. "What's he mean by a collection?" And "TANSTAAFL"?

Actually, I wanted to say "Using the Server Monitor even without 'starting monitoring'", but obviously that would have been confusing, too. Indeed, I allude to this in the entry, about how the feature called "start monitoring" can lead people to think that the monitor doesn't do anything until you at least enable that. Not true, and that was the point of the entry! There's some amazing stuff "with zero overhead".

(Perhaps I also lost people with my play on the acronym, TANSTAAFL ("there ain't no such thing as a free lunch"), where I was referring to how there IS a "free lunch" here. Serves me right for being tricky. Again, I was scrambling to come up with a title because of the "start monitoring" challenge.)

Don't miss the features--truly hidden gems!

Anyway, the point is that if you're interested in the new CF 8 Server Monitor, whether for production user or not, you really ought to check out what I pointed out. I do think you'll be amazed.

Drop your comments on it over there, please. Not here. Don't want to create any further confusion! In fact, I'll disable comments on this one (another first).

CF 8 Hidden Gem: Using the Server Monitor even without pressing "start" buttons...yes, "free lunch"

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
In my previous entry, I explained how different features of the CF8 monitor have different levels of overhead. I also pointed out that there was value even if you didn't enable any of the features at all. I can't stress that point enough. So yes, there "is" such a thing as a free lunch.

Some Cool Info: at ZERO COST

Even without pressing the buttons to start "monitoring", "profiling", or "memory tracking", you can see:

  • how many pages are having errors, and details on each
  • jvm memory used, and a detailed graph
  • template cache status (how many pages, and total size of the cache), graphed over time
  • query cache status (yep, the cached query count and total size)
  • and more

Big deal, I may hear some say. Well, it is a big deal. That template cache and query cache status info is gold, and something that many of us have long lamented to have. Talk about opening up the black box. And with no overhead.

But wait (to quote the old Ginzu knives commercials from the 80's), there's more! And I mean, seriously cool info--again at zero cost.

Some Amazing Info! Again, at ZERO COST

Even without enabling ANY of the three buttons, you'll still be able to see all this really cool new info:
  • active sessions (yes, a list of all sessions currently active, and if you click on each, the session variables and values currently assigned!)
  • application scope memory usage (yes, as above!)
  • server scope memory usage (yes, as above!)
  • and more

All I can say is "wow". That is just so cool to get that, for free.

Don't we need to enable "memory tracking"?

I'm sure some are asking, "Well, isn't that what the 'start memory tracking' would be about?" Apparently not!

The help page for the monitor (the ? at its top right) describes the memory tracker as reporting "the queries and sessions that have used the most memory... and profiling information on the largest variables on the Requests by Memory Usage report". I'm willing to do without those in exchange for the info above, most of the time.

Now, on the other hand, the ellipses in my quote above (the "...") refers to where it also said the memory tracker provides "the memory usage of all application and server scopes". Hmm. Well, I'm seeing that without enabling it. Or maybe it's referring to some other aspect of the reports. There are indeed many reports in the monitor which had no data if none of the "start" buttons were enabled.

So what, then is the "start monitoring"?

As for the "start monitoring", according to the help it provides info on "active requests, slowest requests, active sessions, cumulative server usage, highest hit counts, template cache status, request throttle data, requests that timed out, requests with errors, and server alerts." Again, I'm not so sure about that. I'm seeing a few of those without using that feature.

I'll leave it to you to read what the "start profiling" says it enables.

I do think an argument could be made that the "start monitoring" button probably may contribute to confusion. I'm sure some will try to convey what I've written and talk about what you can get from "the monitor", and some will assume it's tied to enabling that button, when clearly it isn't. Maybe it could be called something else. Probably too late for that.

Joy in Mudville

So if you hear someone say, "we won't use the monitor in production", slap them roundly on the cheek...I mean, point them to this blog entry (and the last one). Seriously, it's tragic if someone would miss out on the value of the monitor simply because of an overinflated sense of fear.

But do have them check for any comments below, too. Maybe someone will correct me. Maybe my setup is somehow unique, but I've run many tests without these other features on and observed in real time the display of all the above.(And I have not had the "start" features enabled since I installed the RC a week ago, though I did have them enabled in previous betas. I can't believe that's having an impact.)

Finally, I'll point out that even if you don't want to (or can't for some reason) use the Server Monitor interface, you can get all the same information by way of the Admin API, and a new servermonitoring.cfc. Ray Camden's done a blog entry on it. Indeed he makes a similar observation about how he was able to get some of the methods to return data even if the docs said that a particular monitor feature must be enabled.

Check it out for yourself, and feel free to report here your corrections, or your delight. Hope that's helpful.

CF Server Monitor: what's the impact on production? you may be surprised

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
The CF Enterprise Server monitor is more powerful than many may realize, yet naturally some are immediately concerned about its potential overhead, especially if they're considering running it in production. Things aren't quite as obvious as they may seem, or as many may assert.

Update: I've updated this entry now 5 years later, in 2012, to give a bit more context to what I said originally. No change in the message, just a little more info and perspective. (There's also no change in the impact of it, pro or con, in CF 9 or 10.)

First, it's indeed true that depending on what you enable, it *could* be very resource-intensive and could even bring down a server under load. But conversely it also can have ZERO impact--yes, even in production. I'll discuss that in my next entry.

But before that, I just want to take a moment and explain the key 3 features that control what impact, if any, it will have.

Note that there are three buttons at the top of the monitoring page which "start" different monitoring features. (If you don't see these buttons, just refresh the browser again to get them to appear.)

So what are the implications of starting each of the optional monitoring features?

  • start memory tracking: this has the highest potential impact for overhead, which can be very substantial, even to the point of crashing your instance. And even on a low-traffic developer machine, you might see a big hit from running this. More on this in a moment.
  • start profiling: this has much less overhead. It primarily enables tracking of database activity. The help page for the monitor calls its overhead "minimal", but I will note that on a CF server with tremendous DB activity, its overhead could be more substantial.
  • start monitoring: This is the least impactful button. It's needed to at least see running requests, as well as to have Alerts fire. But even on a busy server I've rarely seen it have a negative impact. That said, you don't need ANY of the 3 buttons enabled to see at least some info. More below.

Definitely check out that help page (from the front page of the monitor) or discussions in my 4-part series of articles on the monitor to learn more about what each button does as well as more about the monitor itself and its many features.

About the Memory Tracking feature

You'll note that I hedged above on the impact of the Memory Tracking. Conventional wisdom is that it is indeed a potential server killer, and I can confirm that I've seen it many times in my CF server troubleshooting consulting practice. But I can also report that I've seen it running on production machines and having virtually no seeming impact. I kid you not.

I suspect it has to do with how many objects are in memory, how complex they are, how busy the server is, etc.

Now, some might propose that you use it only for brief periods (minutes, seconds) to gather some info for analysis, perhaps only in emergency. (I even said this in my initial version of this blog entry.) But many have found that things go horribly wrong on some CF instances the moment it's enabled. So it's probably best not to use it at all on live prod server.

You might be able to do it in a test/dev server, and you may get value form that in looking at the impact at least of individual or small numbers of requests. But beware also that some problems simply don't present themselves except under load (and often only in production, not even with load testing), so using it in dev/test may not help spot/understand/resolve all problems.

So does that mean there's no value if you can't use this feature in prod? Well, no. Remember, this is one of 3 buttons. The other two have less overhead (especially "start monitoring"). More than that, you can get value from the monitor with NONE of the buttons turned on.

Any value if none turned on?

Yes, don't miss this vital point: there is value to using the monitor even with none of the start buttons enabled. That is deserves its own entry. Who says there's no such thing as a free lunch? :-)

So if you hear someone say "don't use the monitor in production", please make sure they're clear on all this. There are 3 features you can enable, or none at all, and each provides different info at different costs--some of it zero.

Postscript: The buttons stay enabled after closing the monitor, and even over restart

I know I've discussed this elsewhere, but while I'm updating this entry let me reiterate the point: it's vital that you understand that if you turn on any of these buttons, they STAY TURNED ON, even if you close the monitor. And EVEN IF YOU RESTART CF. In fact, this is important enough to deserve its own entry. I'll post that now (as I update this in 2012), CF911: Using the #ColdFusion Server Monitor? Be aware that the "Start" buttons remain enabled.

More Entries

Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting