代码之家  ›  专栏  ›  技术社区  ›  Scott Jibben

ColdFusion 10/11度量记录问题

  •  1
  • Scott Jibben  · 技术社区  · 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 ()
    

    在谷歌呆了几个小时后,我在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>调试&日志记录>调试输出设置>启用度量记录。

    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开发服务器上,我打开了EnableMetricsLogging,只是想看看它报告了什么。该文件的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标准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)
    

    问题

    是否有人知道如何使用EnableMetricsLogging来实际报告使用的线程?
    在第一个链接中,“carl type3”发布了他的metrics.log文件的示例,其中包含了我想要获取的所有信息。

    CF管理指标设置

    ColdFusion 10/11 Metrics Settings

    ColdFusion 10员工属性:

        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 回复  |  直到 11 年前
        1
  •  2
  •   Anit Kumar    11 年前

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

    enter image description here

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

        2
  •  1
  •   Chris    11 年前

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

    在大多数将IIS作为前端Web服务器的设置中,它是8012,因此您需要将CF Admin中的此设置更改为此值。 重新启动coldfusion,您将最终在cfstat中以及在度量日志中看到一些值。