Enable Metrics Logging

Overview

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:

Jul 13, 2019 16:03:17 PM Information [scheduler-1] - Max threads: 200 Current thread count: 10 Current thread busy: 0 Max processing time: 46319 Request count: 532 Error count: 1 Bytes received: 1255 Bytes sent: 1665555 Free memory: 153142640 Total memory: 786956288 Active Sessions: 2

Enable Metrics Logging

You can enable Metrics logging by performing the following steps:

  1. Login to your ColdFusion Administrator.
  2. Navigate to the Debugging & Logging section of ColdFusion.
  3. In the Debug Output Settings section there is a checkbox option to Enable Metrics Logging.
  4. Once selected click the Submit Changes button in the top righthand corner.

509-222-max

Important Information

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: C:\ColdFusion[version]\cfusion\runtime\conf\server.xml

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.