[Looking for Charlie's main web site?]

Tracking number of CF sessions per application easily, and why you should care

Note: This blog post is from 2009. 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.
Ever wanted to count how many sessions are active on your server, in total and per application, whether on CF 7 or 8? And regardless of whether you're using CF's regular sessions or the "new" J2EE sessions feature introduced in CF 6? Would you be surprised to find you could have a shocking number of active sessions?

[....Continue Reading....]

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.

Suffering CPU/DB/memory problems in CF? Spiders, monitor pings, and more may be to blame

Note: This blog post is from 2006. 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're trying to get to the bottom of high memory or CPU use or database contention on CFML servers, you may be missing a seemingly innocuous but deadly invader (or many of them, really. Many more than you may ever dream.) If you're focusing only on "what are my long running requests?" or wondering "Why does CF have a memory leak?", you may be looking at the wrong problem.

What if the problem isn't really a "leak" at all, nor "poorly performing code", nor "CF being unable to scale", but instead what if it's really all due thousands or millions of page requests, which (worse) are likely creating (unexpectedly ) thousands or millions of sessions and client variables, each day? They may even be something you're causing (but more likely not). It's a pernicious problem that many never even fathom, or may dismiss too readily.

Curious to hear more? Read on.

[....Continue Reading....]

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