背景资料
我最近刚开始在生产 ColdFusion 10 服务器上遇到这些错误:
Service Temporary Unavailable!
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Jakarta/ISAPI/isapi_redirector/1.2.32 ()
在谷歌上花了几个小时后,我在 adobe 论坛上看到了这个帖子:
https://forums.adobe.com/thread/1016323?start=0&tstart=0
这个线程中有很多信息,但我主要关注两个方面。
获取线程/会话/内存指标的当前使用情况。
使用度量信息来调整 ColdFusion IIS 连接器配置
我的目标是完成这篇博文:http: //blogs.coldfusion.com/post.cfm/tuning-coldfusion-10-iis-connector-configuration
此报告的错误中引用了博客文章: https ://bugbase.adobe.com/index.cfm?event=bug&id=3318104
问题
我目前被困在#1;获取线程/会话/内存指标的当前使用情况。
我检查了:CFadmin > Debugging & Logging > Debug Output Settings > Enable Metrics Logging。
ColdFusion 10 metrics.log:
"Information","scheduler-1","07/20/14","15:12:24",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 1055964040 Total memory: 1570766848 Active Sessions: 679"
"Information","scheduler-1","07/20/14","15:13:24",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 1136605536 Total memory: 1572864000 Active Sessions: 674"
"Information","scheduler-1","07/20/14","15:14:24",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 939095720 Total memory: 1572339712 Active Sessions: 673"
在 ColdFusion 11 开发服务器上,我打开 Enable Metrics Logging 只是为了查看它报告的内容。该文件的 metrics.log 如下所示:
"Information","scheduler-1","07/20/14","15:20:59",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 589971080 Total memory: 1320157184 Active Sessions: 40"
"Information","scheduler-2","07/20/14","15:21:59",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 583831160 Total memory: 1320157184 Active Sessions: 41"
"Information","scheduler-2","07/20/14","15:22:59",,"Max threads: null Current thread count: null Current thread busy: null Max processing time: null Request count: null Error count: null Bytes received: null Bytes sent: null Free memory: 907572096 Total memory: 1431830528 Active Sessions: 40"
问题是几乎所有信息都以“空”的形式返回。
ColdFusion 10 环境:Windows Server 2008 R2、ColdFusion 10 Standard 64 位、Java 7u60
ColdFusion 11 环境:Windows Server 2012 R2、ColdFusion 11 Standard 64 位、Java 7u65
附加说明
这是在 ColdFusion 10 上的 Coldfusion-error.log 中找到的(虽然不在 CF 11 中):
java.lang.NullPointerException
at coldfusion.server.jrun4.metrics.SimpleLoadMetric.run(SimpleLoadMetric.java:157)
at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:211)
at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
问题
有谁知道如何让 Enable Metrics Logging 实际报告使用的线程?
在第一个链接中,“carl type3”发布了他的 metrics.log 文件示例,其中包含我想要获取的所有信息。
CF 管理指标设置
ColdFusion 10 workers.properties:
worker.list=cfusion
worker.cfusion.type=ajp13
worker.cfusion.host=localhost
worker.cfusion.port=8012
worker.cfusion.max_reuse_connections=250
worker.cfusion.connection_pool_size=500
worker.cfusion.connection_pool_timeout=60
ColdFusion 10 server.xml 连接器:
<Connector port="8012" protocol="AJP/1.3" redirectPort="8445" tomcatAuthentication="false" maxThreads="500" connectionTimeout ="60000" />