Server Settings

The first header, Server Settings, contains several items beneath it that control how the ColdFusion Server behaves. We examine each below.


Beneath the Server Settings header, you have several clickable items from which you can choose. The first of these is, simply enough, Settings. This page enables you to adjust several serverwide settings that have an effect on how the ColdFusion Server performs. Figure 25.2 gives you a look at the Settings page.

Figure 25.2. Settings page in the ColdFusion Administrator.


On the page shown in Figure 25.2, you can adjust six unique serverwide settings. Table 25.1 provides you an overview of each setting.

Table 25.1. ColdFusion Administrator Server Settings, Settings Page


Description of Setting

Limit simultaneous requests to

This setting enables you to limit the number of requests that ColdFusion Server can process concurrently. After this limit is reached, all other incoming requests are queued. Limiting the number of requests served concurrently can increase the performance of the ColdFusion Server.

Timeout requests after x seconds

By checking this check box, you are essentially telling ColdFusion Server to wait no more than x seconds for a request to complete before timing that request out. By enabling a timeout request value, you help ensure that server resources aren't tied up processing problematic or particularly long running requests.

Use UUID for cftoken

When this option is checked, rather than a random number being generated when a CFTOKEN is requested, a universal unique identifier (UUID) is generated instead. UUIDs are, by their nature, much less likely to be duplicated (in fact, they are virtually always unique) than a random number.

Enable Whitespace Management

By checking this check box, you are telling ColdFusion to compress carriage returns, spaces, and tabs that are present in raw ColdFusion Markup Language (CFML) templates to help reduce the size of the output. Checking this setting helps to eliminate extraneous whitespace throughout the output of CFML templates, thus reducing the overall size of the output file.

Missing Template Handler

This setting enables you to specify a particular template that you'd like to run whenever ColdFusion encounters a 404 error. By specifying a missing template handler, you are shielding your users from unfriendly "standard" error templates.

State-wide error handler

Much like the missing template handler, the state-wide error handler enables you to specify a template that you'd like to have run in the event that ColdFusion encounters an unhandled error while processing a request. Again, the purpose of this is to create error messages that are more friendly to the end user while shielding critical server information.

Settings Helpful Hints

A couple of the settings deserver further comment. Here are some helpful hints concerning them.

Limit Simultaneous Requests

This setting can have the most dramatic effect on how the ColdFusion Server performs. When adjusting this setting, your goal is to achieve a balance between the maximum use of your processing power and the total time it takes to process requests. As an example, if you have this setting set to 4, then each request gets 25% of the total processor power dedicated to the ser-vicing of that request. That means that, theoretically, each request completes more quickly than if you had a simultaneous request value of 10, where each request would use only 10% of the processor power. Of course, what this value should be set to is different for each application. If you have a database-intensive application in which most of the time in a given request is spent waiting for results to return from the database, you can afford to have a higher simultaneous request limit.

Timeout Requests After x Seconds

It is important to always have a timeout value set. What you set this timeout to is completely up to you, though it is helpful to determine the maximum amount of time that you think your users will wait for a page to return. In our experience, we've seen very few users who are patient enough to wait more than 60 seconds for a page to come back (and in many cases, the patience level is much lower). I don't think it's particularly helpful to have this value set much higher than what you believe your user base will bear. If you do, your users will click Stop or Refresh in their browsers and spawn another request.

If you have a page that you know is going to take a particularly long time to return, it's best to warn your users ahead of time (with some form of message letting them know of the process that they're about to start). Then use things like incremental page delivery (via CFFLUSH) to help speed up the perception of delivery. You can also specify a longer timeout value (for pages that you know run long) by appending a RequestTimeout=x parameter to the uniform resource locator (URL) of the long-running page. The value you insert here supercedes the value that is set in the Administrator, and this is often the better choice for handling a few problematic pages within the application. The syntax of the RequestTimeout parameter would look similar to the following example:



The next place we want to go in our tour of the ColdFusion Administrator is to the Caching page. Figure 25.3 gives you a look at the page inside of Administrator.

Figure 25.3. Caching page in the ColdFusion Administrator.


On the Caching page shown in Figure 25.3, you can adjust three unique, serverwide settings. Table 25.2 gives you an overview of each.

Table 25.2. ColdFusion Administrator Server Settings, Caching Page


Description of Setting

Template cache size (number of templates)

In ColdFusion MX, this setting has been changed slightly. If you've worked with performance tuning previous versions of ColdFusion, you might remember that the rule of thumb was to set this value to 3 5 times the total size of all of your raw CFML templates. In ColdFusion MX, you simply set this value equal to the total number of templates that you want to remain in cache. It's best to set this value equal to the total number of ColdFusion templates on your server. This eliminates the need to reprocess your templates and compile them to bytecode again if it's already been done once. In ColdFusion MX, this can greatly help with server performance.

Trusted cache

Checking this setting tells ColdFusion that the copies of the template it has in memory are the most current, so there is no need to check for updates from the disk. On production servers, where updates to the codebase are closely managed, leaving this setting on can have a positive effect on server performance.

Limit the maximum number of cached queries on the server to x

This setting enables you to put a limit on the number of cached queries that ColdFusion holds onto before dumping the oldest one and replacing it with a new one. Of course, you can have as many cached queries as you'd like, but you need to remember that queries and the subsequent result sets stored in memory increase the overall memory footprint of the ColdFusion Server. Having too many cached queries, or having several that are excessively large (including results), can be a performance drain, especially if you have limited random-access memory (RAM) available.

Caching Helpful Hints

A few words on the Trusted Cache setting might prove helpful. Before you turn this setting on in production, it's critical that you have a complete understanding of the effect of this setting. When a user requests a ColdFusion template from your server, your web server receives that request. It understands that a ColdFusion file is being requested, and the web server passes the request to the ColdFusion engine. The ColdFusion engine then retrieves the raw CFML file being requested from disk and compiles it to bytecode.

After the template has been compiled to bytecode, it's placed in a template cache. That means that the next time a request comes in for that particular template, ColdFusion won't need to recompile it, provided that the template cache is big enough to accommodate the compiled version. However, even if a template has already been compiled and is in template cache, ColdFusion still compares what is compiled in cache to the copy of the raw template on disk to make sure that no changes have been made. If no changes have been made, the ColdFusion goes ahead and serves back the cached copy. If any changes have been made to the source, the template is recompiled before being sent back to the client.

Turning on "trusted cache" eliminates the comparison of what is in cache to the source templates on disk. You are essentially telling the ColdFusion server to "trust" the copy of the template that is has in cache as the most current copy hence the name "trusted cache." On servers where the source never changes or changes in a infrequent, managed way, having this setting on improves server performance and response time.

Client Variables

Next, we move to the Client Variables page. Figure 25.4 gives you a look at this page inside the Administrator.

Figure 25.4. Client Variables page in the ColdFusion Administrator.


On the Client Variables page shown in Figure 25.4, you can choose where you'd like to store client variables on your system. Table 25.3 gives you an overview of each choice you have for client variable storage.

Table 25.3. Choices for Client Variable Storage

Storage Location

Pros and Cons


Yes, you can store client variables in the system registry, and there are some people who would tell you that there are actually reasons why you'd want to do so. However, I can't think of any good reason to do this, and all kinds of reasons why you shouldn't. Please don't store client variables in the system registry if you want any modicum of performance on your server.


You can store your client-variable information in cookies on the client's browser. This works well as long as the client doesn't have cookies disabled and you don't want to store anything larger than 4K.


This is by far the best choice for storing client-variable information, and it's relatively simple and easy to manage.

Memory Variables

Next we move to the Memory Variables page. Figure 25.5 gives you a look at the page inside the Administrator.

Figure 25.5. Memory Variables page in the ColdFusion Administrator.


By default, when ColdFusion is installed, application and session variables are enabled. If you uncheck either of these items, you no longer can use either application- or session-scoped variables in your ColdFusion applications.

You can also come to this page in the Administrator to specify maximum and default timeout values for application and session variables. You should be aware that the values you enter here override any maximum timeout values that you have set in the Application.cfm, so be careful when adjusting these values.

In addition, a new option in ColdFusion MX is the ability to use J2EE session variables. When you check this box, ColdFusion creates an internal identifier for each session that's spawned, and you no longer see CFID and CFTOKEN values.


Next we move to the Mappings page. Figure 25.6 gives you a look at the page inside the Administrator.

Figure 25.6. Mappings page in the ColdFusion Administrator.


The mappings section of the ColdFusion Administrator is used to created aliases for paths to directories on your server. For example, if you had a directory of images outside the webroot that you need to reference from your CFML templates, you'd create a mapping to that image directory here.

Mail Server

Next we move to the Mail Server page. Figure 25.7 gives you a look at the page inside the Administrator.

Figure 25.7. Mail Server page in the ColdFusion Administrator.


On this page, you can choose how you'd like to configure the mail server that's going to work with ColdFusion Server.

In the Mail Server field, you can enter the Internet Protocol (IP) address of the mail server that you want ColdFusion to use when you send mail from within an application with the CFMAIL tag. This can be an IP address of a remote server, or it can simply be a loopback address if you're going to use a mail server that's local to the machine on which ColdFusion is running.

Next, you have an option to specify the port that you'd like to send mail on. Typically, this port is 25, so using the default is okay, but you can change the port here should you need to.

You can also elect to set a connection timeout. Essentially, this caps the maximum amount of time that ColdFusion waits for the mail server to respond before timing out the mail process being attempted and moving the message to the Undeliverables folder.

The spool interval can also be adjusted. This setting controls how frequently ColdFusion looks at its spool directory and processes any mail that is waiting there.

The Verify Mail Server Connection check box simply instructs ColdFusion to attempt to connect to the mail server when changes to this page are submitted, to ensure that you've entered everything correctly.

You also have the option, at the bottom of page, to control how mail messages are logged. The settings here are fairly self-explanatory, but it helps to know where to go if you need to make changes.


Next we move to the Charting page. Figure 25.8 gives you a look at the page inside the Administrator.

Figure 25.8. Charting page in the ColdFusion Administrator.


On the Charting page shown in Figure 25.8, you can adjust four settings that control how charting is handled within ColdFusion. Table 25.4 gives you an overview of these four settings.

Table 25.4. Overview of Charting Settings


Description of Setting

Cache type

When you create charts, you have the choice of caching them to disk or RAM. Of course, caching them to RAM is faster, but it also increases the overall ColdFusion memory footprint.

Maximum number of images in cache

This setting enables you to control the maximum number of charting images that you want to remain stored in cache at any given time. After your limit is reached, the oldest image is thrown out and replaced with a new one.

Maximum Number of charting threads

This setting enables you to specify the maximum number of charting requests that can be processed concurrently. By default, this value is set to 1. It can be no higher than 5. Keep in mind when adjusting this value that charting is a very memory-intensive activity, so attempting to process a large number of concurrent charting requests at any given time can cause performance degradation.

Disk cache location

When you choose to cache to disk rather than to RAM, this setting enables you to specify the location where you'd like to store the cached image files on your disk.

Java and JVM Settings

Next we move to the Java and JVM page. Figure 25.9 gives you a look at the page inside the Administrator.

Figure 25.9. Java and JVM page in the ColdFusion Administrator.


On the Java and JVM page shown in Figure 25.9, you can adjust five, serverwide settings that control how Java and the Java Virtual Machine (JVM) are configured for use with ColdFusion. Table 25.5 gives you an overview of these five settings

Table 25.5. Overview of Java and JVM Settings


Description of Setting

Java Virtual Machine Path

This setting enables you to specify the path of the Java Runtime Environment (JRE) that you want to use with ColdFusion MX. When ColdFusion MX is installed, it installs its own JRE that is mutually exclusive from any other JRE on the system. It is this JRE with which ColdFusion MX is tested, and this is the supported configuration. It is not recommended that you attempt to change the JRE path as the results might be unpredictable.

Initial Memory Size

This setting enables you to specify an initial heap size for the JVM.

Maximum Memory Size

This setting enables you to specify a maximum heap size for the JVM.

Class Path

This setting enables you to specify the file path to the directories that contain any class files that you'd like to use with ColdFusion MX.

JVM Arguments

This setting enables you to specify any arguments that you'd like to be used when running the JVM.

Archives and Deployment

Next, we move to the Archives and Deployment page. Figure 25.10 gives you a look at the page inside the Administrator.

Figure 25.10. Archives and Deployment page in the ColdFusion Administrator.


This page enables you to specify the location of ColdFusion applications, datasources, and configuration information that you'd like to deploy to another location. Working through this page, you can also deploy existing archive files to your server.

Settings Summary

The final item under the Server Settings header is an item that enables you to view a settings summary. This summary runs down all the relevant settings on your ColdFusion Server, providing you a convenient way to determine, at a glance, how a given ColdFusion Server is configured.

Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579 © 2008-2017.
If you may any questions please contact us: