Pop quiz, hot shot. Your ColdFusion server's CPU spiked. What do you do?
If you, like many CF folks, are at a small CF shop and seemingly in charge of everything about related to your websites, even though your primary expertise is coding, then you don't want to be caught off guard and flail about aimlessly when your manager says, "After weeks of no problems, all of the sudden the CPU spiked like 80% higher than normal and is just stuck up there for no apparent reason. Get with IT and find out what's going on."
My strategy is to create a checklist and then set about to disprove each one until I narrow it down to the root cause.
I'm limiting this blog to a simple bullet list, in no particular order, of things I explore, with no detail. For more details on common causes of CPU/ColdFusion issues, Charlie Arehart does a much better, more thorough job on his CF blog. Think of my list as more of a cheat sheet.
Here's my current checklist on what to check.
Ask: what are the symptoms other than the CPU being higher than normal?
sudden increase in traffic, maybe from bots/crawlers
process, like rsync or a virus scanner, running longer than expected
DB: CPU, memory, or I/O intensive queries
DB: locking/blocking issues
DB: are latest updates applied?
Web Server: IIS, Apache, etc.
CF: 3rd party calls - HTTP(S), REST, SOAP
CF: are latest updates/hot fixes applied?
CF: too many templates in cache
CF: recent CF Admin settings changes
CF: scheduled tasks running poorly, or too long
CF: hidden errors, not emailed (check the *.log files)
CF: Client variables purging
CF: OutOfMemory errors (ColdFusion-*.log)
CF: slow-running code (that times out, or hogs a lot of resources)
CF: database driver bugs or memory leaks
CF: too many active Sessions that each use a lot of memory (check if you're properly ending Sessions in your code)
CF: intensive image processing
JVM: recent changes to version
JVM: recent settings changes
JVM: Garbage Collection (GC) problems
What have I missed on my checklist?