The first header, Server Settings, contains several items beneath it that control how the ColdFusion Server behaves. We examine each below. SettingsBeneath 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.
Settings Helpful HintsA couple of the settings deserver further comment. Here are some helpful hints concerning them. Limit Simultaneous RequestsThis 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 SecondsIt 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: http://servername/longRunningTemplate.cfm?RequestTimeout=300 CachingThe 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.
Caching Helpful HintsA 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 VariablesNext, 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.
Memory VariablesNext 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. MappingsNext 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 ServerNext 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. ChartingNext 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.
Java and JVM SettingsNext 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
Archives and DeploymentNext, 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 SummaryThe 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. |