1

背景资料

我最近刚开始在生产 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

这个线程中有很多信息,但我主要关注两个方面。

  1. 获取线程/会话/内存指标的当前使用情况。

  2. 使用度量信息来调整 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/11 指标设置

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" />
4

2 回答 2

2

要启用指标日志记录,请转到调试和日志记录>调试输出设置,然后更新下面突出显示的值。

在此处输入图像描述

“最大线程数”在您的日志中显示空值,这进一步推断未启用指标日志。使用当前线程计数作为 connection_pool_size 的输入,然后设置 max_reuse_connections。您还需要按照http://blogs.coldfusion.com/post.cfm/coldfusion-11-iis-connector-tuning中的建议在 server.xml 中添加 connectionTimeout 和 maxThreads 。这也适用于 CF10。

于 2014-07-21T15:02:53.833 回答
1

您需要在 CF Admin 中设置的正确端口可以在 cfusion 的 server.xml 中找到。

在大多数使用 IIS 作为前端网络服务器的设置中,它是 8012,因此您需要在 CF Admin 中将此设置更改为该值。重新启动冷融合,您最终应该会在 cfstat 以及指标日志中看到一些值。

于 2014-07-23T07:27:26.450 回答