Sometimes I find it necessary to duplicate an entire installation of Coldfusion MX. For example, if I'm setting up a staging server with exactly the same drives and code base as production, I will want the exact same configuration. This is actually pretty easy to do. First, install Coldfusion MX. Next stop all the services associated with Coldfusion (there are 3). Rename the "cfusionmx" folder to something else. Then copy in the "production" CfusionMX folder. If the 2 servers are really configured the same you can start the services and you are ready to go - almost.Read More
I've seen this error several times, but it happens so infrequently I always forget the solution. I thought I would record it here for posterity. If you have a Win2K box with a some ODBC databases installed you might may have seen an error appearing in your "application" log in the event viewer. The error is actually a pair of messages that occur together each second. The error is cryptic but seems to indicate trouble finding performance counters for ODBC.Read More
Here's a tip on application variables from the inestimably knowledgeable Sean Corfield. In my previous post on Application Variables I used a pretty typical example of how they are initialized. I checked for the existence of a particular application variable. If it did not exist, I would lock and set all the variables. Sean pointed out that this approach is still subject to threading issues. To start with, here's the original example.Read More
Getting a handle on Application variables can be difficult. Even folks who know what they are sometimes use them incorrectly. There are 2 common forms of simple application variables (we'll leave the discussion of objects and CFCs for another time). There is the "set once read many" variable. Usually these are "settings" for the application - things like paths and data source names - Application.dsn, or Application.imagePath.
Then there is the "global tally" variable. This is less common, but it is usually some variable that is incremented or updated throughout the life of the application. For example, it might be a variable to track the number of logged in users. This variable is actually set (sometimes frequently) as the application is used. The main thing to remember about an application variable is that it lives beyond the request or session. It's something that is put in place as a variable and stays put for every user of the application. Some call it persistence - but the OO purist pee their pants when they hear that so I will refrain (too bad too, it's a good word for it). Let's focus on that first example of "set once read many".Read More
This post is an update to the previous post, Cfdocument Troubleshooting. Steve House provided this Forum Thread with several tidbits of information regarding the cfdocument tag and its troubles with images. It is to be hoped that the updater referenced in the thread will solve our issues with the tag.
We are doing a CFMX 7 project that requires Cfdocument. The application moves what used to be a paper form process online. Naturally, some forms still need to be printed. Cfdocument is a great choice because it allows us to put various forms and bits of related data together in new ways that extend the old paper system. It works quite well for this task - when it works. We've run into at least one major server configuration problem.
We had a problem with some images not being rendered correctly, and we noticed a hot fix for what seemed like our issue - ID number 59868, images not scaling properly. When we installed the hot fix, Cfdocument stopped working altogether.Read More
Here's a "gotcha" tip. I have a dev server that had 512 megs of RAM on it. I had the JVM heap sizes configured at 256 meg minimum and 384 meg maximum. Today I added some memory to bring it up to 1 gig. I wanted to change the minimum heap to 512 and the maximum heap to 768. Naturally I set both of them to these new values and hit "submit". I got an error that the "minimum" cannot exceed the maximum. Apparently, the code takes care of minimum first. That means it took my value of 512 and compared it to the "old" maximum value of 384 - causing the error.
To fix this I had to set each value independently - starting with the max value. I set the max value to 768 without touching the Min value. Then I set the min value. I thought that was the end and I went happily to restart the CF service to implement my changes. Naturally the service wouldn't start. I examined the coldfusion-err log in the and it said that I could not start the JVM because I was using conflicting garbage collection switches.
Indeed I had change GC type based on some excellent tips from robi sens blog (from UseParallelGC to UseConcMarkSweepGC). Due to the error (I'm guessing) the system had added the UseParallelGC back into my jvm.config file.
So, if you are going to use the cold fusion admin ap to make JVM changes make sure and backup your jvm.config file (found in the runtime/bin directory on a standard installation).
At some point you will have to troubleshoot server problems. Trust me - it will happen. It's no good sticking your head in the sand or your fingers in your ears (or both - tricky, but doable). Your first question will likely be, "Where do I find out information about what is happening on the server." Fortunately there are a great many log files in Coldfusion. Unfortunately they are not easy to find, and they contain different formats of information. There are 3 "groups" of file based logs on a Coldfusion MX installation. These groups are mostly the same for CFMX 7 as they are for CFMX 6 and CFMX 6.1 (a few exceptions). Here's a rundown:Read More