Beginning to see

Recently we implemented a new Coldfusion server monitoring software called SeeFusion.  Coldfusion Server 8 has its own monitoring system, however we are one step behind as I mentioned in previous postings.  So, in order for us to take a look at what is happening on our server and how we can implement better programming techniques, we must turn to software that lets us know what’s going on internally in the server.

When we have a website crash, or more specifically a Coldfusion crash, usually we know what the problem is because we have the Coldfusion logs to pinpoint where the error occurred and what sort of error it is.  Generally speaking the errors will be typos or variables that have not been set properly, and even sometimes input errors.  In these cases, we are given specific lines of code in specific pages that we can at least start the hunt.  But sometimes, we get very vague messages like ‘null null error at -1′ or something similar.  Sometimes there is no way to pinpoint where and what is happening, resulting in a simple restart and hoping that whatever it was is a one-off sort of thing.

The first thing I’ve learned to do in see fusion is to set up a wrapper for our sql calls.  This enables us to see what SQL statements are being executed and how long they’re taking.  We have already noticed that there are a few pages making far too many sql calls which could be simplified by running better joined sql commands.  It’s funny that is one of the first things I learned as a programmer — let the database do what the database does best.  But in an attempt to cut down on code, sometimes I forget that, and I wind up making too many calls to the mySql server rather than one large call that has all the information I need.