Server Monitoring - Server Monitor
Real-time performance monitoring and system health dashboard
Overview
The Server Monitor provides real-time visibility into ColdFusion server performance and health. It displays live metrics for memory usage, active requests, thread activity, query execution, and system resources. This tool is essential for diagnosing performance issues, identifying bottlenecks, and ensuring optimal server operation.
The Server Monitor must be enabled in the monitoring settings before it can collect and display performance data. Once enabled, it continuously tracks server activity and provides instant feedback on system health.
Monitoring Dashboard Sections
The Server Monitor dashboard is organized into several key sections providing comprehensive system visibility.
System Overview
- Green status indicates healthy operation
- Yellow warnings suggest elevated resource usage
- Red alerts indicate critical issues requiring immediate attention
Memory Metrics
85%: Critical threshold
95%+: Immediate action required
Active Requests
- Identify long-running requests consuming server resources
- Detect infinite loops or hung threads
- Analyze request patterns during load testing
- Troubleshoot user-reported performance issues
- Terminate runaway requests preventing server overload
Slow Running Requests
API requests: 5-10 seconds
Reports: 15-30 seconds
- Review slow requests regularly to identify optimization opportunities
- Analyze query execution times and optimize database queries
- Implement caching for frequently accessed data
- Consider asynchronous processing for long-running operations
Database Query Monitoring
Track database query performance and identify optimization opportunities.
Active Queries
- Add indexes for frequently queried columns
- Use query caching for repeated identical queries
- Optimize JOINs and avoid SELECT * queries
- Review execution plans for slow queries
- Consider pagination for large result sets
Query Summary Statistics
System Resource Monitoring
CPU Usage
- Displays
- Current CPU utilization percentage
- Warning Level
- Sustained usage above 80%
High CPU usage may indicate inefficient code, infinite loops, or insufficient server resources.
Thread Pool
- Displays
- Active threads, busy threads, available threads
- Warning Level
- 90%+ threads busy
Thread exhaustion prevents new requests from being processed.
Request Queue
- Displays
- Number of queued requests waiting for processing
- Warning Level
- Queue depth greater than 10
Growing queue indicates server unable to keep up with request volume.
Session Count
- Displays
- Current active sessions, peak session count
- Consideration
- Memory usage per session
High session counts consume memory. Consider session timeout and clustering.
Monitoring Actions
Tools and actions available from the Server Monitor interface.
Terminate Request
View Stack Trace
- Identify slow request in Active Requests view
- Click to view stack trace
- Locate the current line of code execution
- Review surrounding code for performance issues
- Check for database queries, file operations, or external service calls
Take Snapshot
Interpreting Monitoring Data
High Memory Usage (85%+)
- Check for memory leaks in application code
- Review session management and timeout settings
- Analyze query result set sizes (large datasets)
- Monitor application variables for excessive storage
- Consider increasing JVM heap size if necessary
- Enable verbose GC logging for detailed analysis
Request Queue Building Up
- Identify slow-running requests in Active Requests view
- Check database query performance
- Review external service calls (APIs, web services)
- Analyze CPU and memory resources
- Consider increasing concurrent request limit if resources available
- Implement caching to reduce processing overhead
Thread Pool Exhaustion
- Review active requests to identify blocking operations
- Check for deadlocks or circular dependencies
- Analyze synchronous operations that could be asynchronous
- Optimize long-running database queries
- Review request timeout settings
- Increase thread pool size if appropriate
Programmatic Monitoring Access
Access monitoring data programmatically using CFML functions for custom dashboards and alerts.
<cfscript>
// Get server monitoring data
monitoringData = getApplicationMetadata();
// Access memory metrics
memoryUsed = monitoringData.memory.used;
memoryMax = monitoringData.memory.max;
memoryPercent = (memoryUsed / memoryMax) * 100;
// Alert if memory exceeds threshold
if (memoryPercent > 85) {
// Send alert notification
writeLog(
file="monitoring-alerts",
type="warning",
text="High memory usage: #numberFormat(memoryPercent, '999.99')#%"
);
}
// Get active request count
activeRequests = getActiveRequestsCount();
// Get thread pool information
threadData = getThreadData();
busyThreads = threadData.busyThreads;
totalThreads = threadData.totalThreads;
threadUtilization = (busyThreads / totalThreads) * 100;
</cfscript><!--- Get server monitoring data --->
<cfset monitoringData = getApplicationMetadata()>
<!--- Access memory metrics --->
<cfset memoryUsed = monitoringData.memory.used>
<cfset memoryMax = monitoringData.memory.max>
<cfset memoryPercent = (memoryUsed / memoryMax) * 100>
<!--- Alert if memory exceeds threshold --->
<cfif memoryPercent GT 85>
<cflog
file="monitoring-alerts"
type="warning"
text="High memory usage: #numberFormat(memoryPercent, '999.99')#%">
</cfif>
<!--- Get active request count --->
<cfset activeRequests = getActiveRequestsCount()>
<!--- Get thread pool information --->
<cfset threadData = getThreadData()>
<cfset busyThreads = threadData.busyThreads>
<cfset totalThreads = threadData.totalThreads>
<cfset threadUtilization = (busyThreads / totalThreads) * 100>- Build custom dashboards displaying key metrics
- Create automated alerts based on thresholds
- Export monitoring data to external systems
- Generate performance reports
- Integrate with APM (Application Performance Monitoring) tools