Server Settings - Settings
Configure general server settings and request handling behavior
Overview
The Server Settings page contains fundamental configuration options that control how ColdFusion handles requests, errors, and missing templates. These settings affect global server behavior and should be configured carefully based on your application requirements and environment.
Request Settings
Control how ColdFusion processes and manages incoming requests.
Timeout Requests After (seconds)
Development: 120+ seconds for debugging
Batch Processing: Higher timeouts as needed
<cfsetting requestTimeout="value"> to override timeout for specific pages that require longer execution (e.g., reports, batch operations).Use UUID for cftoken
Enable Per App Settings
Enable Application.cfc/Application.cfm
Missing Template Handler
Configure how ColdFusion handles missing templates and errors.
Missing Template Handler Path
/errors/404.cfm- Log 404 errors for analysis (detect broken links, security probes)
- Provide search functionality to help users find content
- Suggest similar or related pages
- Include navigation to main sections
- Set proper 404 HTTP status code:
<cfheader statuscode="404">
Example Missing Template Handler
Basic 404.cfm showing core functionality:
<!--- /errors/404.cfm --->
<cfscript>
// Set 404 HTTP status code
cfheader(statuscode="404", statustext="Not Found");
// Log the 404 error
writeLog(
file="404-errors",
type="warning",
text="404: #cgi.script_name# from #cgi.http_referer#"
);
</cfscript>
<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
</head>
<body>
<h1>404 - Page Not Found</h1>
<p>The requested page could not be found.</p>
<p><a href="/">Return to Homepage</a></p>
</body>
</html><!--- /errors/404.cfm --->
<cfheader statuscode="404" statustext="Not Found">
<cflog
file="404-errors"
type="warning"
text="404: #cgi.script_name# from #cgi.http_referer#">
<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
</head>
<body>
<h1>404 - Page Not Found</h1>
<p>The requested page could not be found.</p>
<p><a href="/">Return to Homepage</a></p>
</body>
</html>- HTTP Status: Always set 404 status code for proper SEO
- Logging: Log 404 errors to identify broken links
- User-Friendly: Provide clear message and link back to homepage
- SEO: Review 404 logs regularly to fix broken links
Site-wide Error Handler Path
/errors/error.cfm- Log complete error details (message, stack trace, request variables) server-side
- Display generic, user-friendly error message
- Send email notifications for critical errors
- Include request ID for support troubleshooting
- Set proper 500 HTTP status code
- Avoid complex logic in error handler (keep it simple to prevent recursive errors)
Example Error Handler Template
Basic error.cfm showing core functionality:
<!--- /errors/error.cfm --->
<cfscript>
// Generate tracking ID
errorID = createUUID();
// Set 500 HTTP status code
cfheader(statuscode="500", statustext="Internal Server Error");
// Log the error
writeLog(
file="application-errors",
type="error",
text="Error ID: #errorID# | #error.message# | Template: #cgi.script_name#"
);
</cfscript>
<!DOCTYPE html>
<html>
<head>
<title>System Error</title>
</head>
<body>
<h1>System Error</h1>
<p>An error occurred while processing your request.</p>
<p>Error ID: <cfoutput>#errorID#</cfoutput></p>
<p><a href="/">Return to Homepage</a></p>
</body>
</html><!--- /errors/error.cfm --->
<cfset errorID = createUUID()>
<cfheader statuscode="500" statustext="Internal Server Error">
<cflog
file="application-errors"
type="error"
text="Error ID: #errorID# | #error.message# | Template: #cgi.script_name#">
<!DOCTYPE html>
<html>
<head>
<title>System Error</title>
</head>
<body>
<h1>System Error</h1>
<p>An error occurred while processing your request.</p>
<p>Error ID: <cfoutput>#errorID#</cfoutput></p>
<p><a href="/">Return to Homepage</a></p>
</body>
</html>- Security: Never display stack traces or error details to end users
- Tracking: Use unique error IDs to help support troubleshoot issues
- Logging: Log errors to dedicated files for analysis
- HTTP Status: Always set 500 status code for server errors
- User-Friendly: Display simple, helpful messages with next steps
Request Queue Settings
Control request size limits and throttling behavior.
Maximum Size of Post Data
- Must be larger than your largest expected file upload
- Balance between functionality and security
- For large file uploads, consider alternative approaches (chunked uploads, S3 direct upload)
- Monitor for large POST attempts in logs
Request Throttle Threshold
- CPU-bound apps: 2x CPU cores
- I/O-bound apps: 4-8x CPU cores
- Mixed workloads: Start at 3x and adjust based on monitoring
- Monitor request queue length under load
- Use load testing to determine optimal value
Request Throttle Memory
Request Limits
Set concurrent request limits for different request types.
Simultaneous Requests
- Default
- 50 (Enterprise) / 10 (Standard)
- Recommendation
- 2-4x CPU cores, test under load
Hard limit on concurrent request processing. Requests beyond this are queued or rejected.
Flash Remoting Requests
- Default
- 5
- Recommendation
- 0 (legacy feature, use REST instead)
Flash Player EOL December 2020. Disable if not using legacy Flash applications.
Web Service Requests
- Default
- 10
- Recommendation
- Based on SOAP usage patterns
SOAP web service invocations are often slower than regular requests.
CFC Function Requests
- Default
- 10
- Recommendation
- Based on API usage, lower for security
Remote CFC invocations. Lower values help prevent API abuse.
Report Requests
- Default
- 5
- Recommendation
- Keep low (3-5), use async generation
CFReport is resource-intensive. Generate reports asynchronously during off-peak hours.
Character Encoding
Default Template Character Encoding
- Default
- UTF-8
- Recommendation
- Always use UTF-8
Character encoding for CFM templates. Ensure all templates are saved in UTF-8 encoding.
Default Resource Character Encoding
- Default
- UTF-8
- Recommendation
- Match template encoding (UTF-8)
Character encoding for cffile, cfmail, and other operations.
Common Issues & Solutions
Request Timeout Errors
- Increase global timeout setting (temporary fix)
- Use
<cfsetting requestTimeout>for specific long-running pages - Optimize slow database queries (use query analyzer)
- Profile code to identify performance bottlenecks
- Consider asynchronous processing for long operations
Request Queue Full
- Increase concurrent request limit (if resources available)
- Add more servers and load balance
- Optimize slow requests (often root cause)
- Implement caching to reduce database load
- Enable request throttling to gracefully handle spikes
Out of Memory Errors
java.lang.OutOfMemoryError, request failures under load- Enable request throttling (immediate protection)
- Increase JVM heap size if physical RAM available
- Reduce concurrent request limits to match available memory
- Fix memory leaks in application code
- Monitor memory usage and set alerts