Controlling the Mail Spool Timeout - Hot Fix for ColdFusion MX 7.0.2 (Updated 04/07/2008)
Issue
After sending large size mail with CFMail, you receive mail spool timeout errors. The exception looks like this:
coldfusion.mail.MailSpooler$SpoolLockTimeoutException.
You are forced to restart ColdFusion to remove the mail spool lock.
Solution
Install the Hot Fix or Adjust the JVM System Property
This hot fix will increase the default from 30 seconds to 60 seconds. If you want to change the default you can also use a JVM argument to adjust the value.
Once you apply this hot fix, your new default timeout will be 60 seconds. You can also change this value by adding a JVM system property called coldfusion.spooltimeout.
Note: This is an updated hot fix released on April 07, 2008. It supersedes hot fix hf702-65340.jar (http://www.adobe.com/go/kb400721) and hf702-65414.jar. Hf702-65414.jar was released in the original version of this TechNote. You must remove those jar files if installed. This hot fix can be used with the cumulative hot fixes CHF702-0002 or CHF702-0003.
The update applies new default timeouts to both the read and the read/write lock that the MailSpooler calls. Previously this update only impacted the read lock.
Both ColdFusion MX 7 cumulative and individual hot fixes are installed in the ColdFusion Administrator. The installation process is the same for all platforms and installation choices.
To install the ColdFusion MX 7.0.2 hot fix:
- Download the hot fix.
- Extract hf702-71489.jar from the hf702-71489.zip file.
- Open the ColdFusion Administrator and select the System Information page.
- Next to the Update File field, do one of the following:
- Type in the file path to hf702-71489.jar, and then click Submit.
- Click Browse and then browse to the hf702-71489.jar. Select the file and then click Submit.
- Restart the ColdFusion server.
The ColdFusion MX 7 hot fix JAR file does not need to be retained after installing it with the ColdFusion Administrator. The file has been copied into the correct location.
To verify the hot fix is being used you should see the jar file in the classpath when looking at the Settings Summary page. The ColdFusion MX 7 hot fix JAR file will appear as a new entry in the System Information list.
To adjust the default value with a JVM system property for JRun:
These instructions will describe hot to add a JVM system property for JRun. Please use respective documentation for other applications servers.
By default, JRun uses a properties file called jvm.config for all server instances as they are started. JRun also allows for specific property files that may use different values for classpaths and JVM version etc. The instructions below use jvm.config as it relates to all your properties files.
- Stop the ColdFusion servers you wish to update.
- Back up the cf_root/runtime/bin/jvm.config and/or jrun_root/bin/jvm.config files.
- Open jvm.config in a text editor.
- Find the java.args entry and add
-Dcoldfusion.spooltimeout=90(or whatever value you wish for the timeout). - Save the jvm.config file.
- Repeat these steps for all server specific jvm.config files.
-
Restart the ColdFusion MX 7 servers.
ColdFusion hot fix jars may be uninstalled by stopping the ColdFusion application server and deleting the respective jar file from cf_root/lib/updates.
Additional Information
To view JVM system properties for any application server, you can use the following text in a ColdFusion tag.
<cfobject type="java" outputclass="java.lang.System" action="create" name="sysobject">
<cfset props = sysObject.getProperties()>
<cfoutput><cfdump var="#props#"></cfoutput>
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
