Metrics logging is helpful when debugging a web application running on ColdFusion. The metrics logging will report details about the number of threads being utilized along with the number of errors an application is receiving.
Sample metrics log:
Enable Metrics Logging
You can enable Metrics logging by performing the following steps:
- Login to your ColdFusion Administrator.
- Navigate to the Debugging & Logging section of ColdFusion.
- In the Debug Output Settings section there is a checkbox option to Enable Metrics Logging.
- Once selected click the Submit Changes button in the top right-hand corner.
By default, the ColdFusion metrics logging option will default to the connector port that Tomcat (the internal web server) is utilizing. In most scenarios, this information is not relevant while debugging. You will want to be sure that you’re enabling Metrics Logging on the AJP connector port which is what your sites are using to communicate with Tomcat. This is so that you’re seeing metrics statistics for sites pointed to your AJP connector rather than listening on the Tomcat web server which does not have website activity. Otherwise, you will only see metrics logging related to the Tomcat web server and as a result, may not find the information you’re looking for.
To find your ColdFusion AJP connector port you will need to access the server’s runtime configuration located in the following path:
In this file you will want to look for the following reference:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!-- begin connector -->
<Connector packetSize="65535" port="8018" protocol="AJP/1.3" redirectPort="8451" tomcatAuthentication="false" maxThreads="500" connectionTimeout="60000"/>
<!-- end connector -->
The correct port to specify in this case would be 8018.
If you’re having trouble Enabling Metrics Logging on your server please feel free to Contact our support team and we’ll be happy to serve you.