ColdFusion 10/11指标记录问题

时间:2014-07-20 20:47:56

标签: coldfusion-10 coldfusion-11

背景资料

我刚刚开始使用生产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 ()

在google上花了几个小时后,我在adobe论坛上遇到了这个帖子:

https://forums.adobe.com/thread/1016323?start=0&tstart=0

这个帖子中有很多信息,但我关注的是两个方面。

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

  2. 使用指标信息调整ColdFusion IIS连接器配置

  3. 我的目标是完成这篇博文: http://blogs.coldfusion.com/post.cfm/tuning-coldfusion-10-iis-connector-configuration

    此报告错误中引用了博客文章: https://bugbase.adobe.com/index.cfm?event=bug&id=3318104

    问题

    我目前停留在#1;获取线程/会话/内存指标的当前使用情况。

    我查了一下:CFadmin>调试&记录>调试输出设置>启用度量标准记录。

    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开发服务器上,我打开了启用度量标准,只是为了查看报告的内容。该文件的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"
    

    问题是几乎所有的信息都会以“null”的形式返回。

    ColdFusion 10环境: Windows Server 2008 R2, ColdFusion 10标准64位, Java 7u60

    ColdFusion 11环境: Windows Server 2012 R2, ColdFusion 11标准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 Metrics Settings

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

2 个答案:

答案 0 :(得分:2)

要启用指标记录,请转到调试&amp;记录&gt;调试输出设置,然后更新下面突出显示的值。

enter image description here

&#34;最大线程&#34;在日志中显示空值,进一步推断未启用度量标准日志。使用Current Thread Count作为connection_pool_size的输入,然后设置max_reuse_connections。您还需要在http://blogs.coldfusion.com/post.cfm/coldfusion-11-iis-connector-tuning中建议的server.xml中添加connectionTimeout和maxThreads。这也适用于CF10。

答案 1 :(得分:1)

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

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