Recommendations for running CommonSpot's PaperThin Application on ColdFusion MX
Issue
CommonSpot's PaperThin application is a content management system originally built in ColdFusion 5. We have found that customers running large sites with the Commonspot application on ColdFusion MX may run into server stability issues. The information below outlines the issues and recommendations for addressing them.
Reason
The main issues are java.lang.outofmemory errors and "too many open files" errors. The memory errors are due to the large amount of dynamically created files that cause the permanent generation space of the JVM to be used up when using the default JVM settings for ColdFusion MX. In addition, if the template cache setting is set too high, it contributes to the out of memory problem as well.
With regards to the "too many open files" error, this is due to JVM Sun bug 4189011.
Solution
Recommendations for java.lang.outofmemory errors:
- Decrease the template cache size in the ColdFusion Administrator Caching settings. We have found that around 4,000 templates is the best setting.
- Increase the permanent generation space for the JVM. Add -XX:maxpermsize=512 to the java.args line of the jvm.config file. Recommend increasing the max heap size as well to 1024. This will allocate 1.5 GB to the JVM, so make sure that the server itself has enough memory.
- Do not run with debugging enabled on production machines. We do not recommend running debugging on a production machine even with restricted IP address access. There was a bug with debugging that caused a memory issue in ColdFusion MX 6.1, which when running the Commonspot application, compounded the issue. This issue is fixed by applying the ColdFusion MX 6.1 Updater and hot fix 59763. This is fixed in ColdFusion MX 7 with cumulative hot fix 2.
Recommendations for "too many open files" error:
- Increase FILES=100 in C:\WINNT\System32\CONFIG.NT. On some Windows 2000 machines, this has helped with this issue.
Recommendations for Server Settings in the ColdFusion Administrator:
- Set Simultaneous Requests based on number of CPUs on the machine. 3-5 threads per CPU. For example, for a 2 CPU machine, set this number to 10 with this application.
- Enable Timeout Requests after ( seconds) 60. If there are legitimate long running pages in the application, this setting should be overridden in the specific page using the
cfsettingtag and therequestTimeoutattribute.
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!
