Jetty服务器访问日志中的负响应时间

Jetty服务器访问日志中的负响应时间,jetty,Jetty,我在Jetty上运行,我的访问日志配置为显示响应时间 今天,我注意到很少的请求(约60万个请求中的30个)具有负面响应时间,我想知道是否有人遇到过这种行为 以下是我的回答示例: --“POST HTTP/1.0”201461-18096 如果您想在访问日志中识别此项,这是我使用的grep命令: grep--color“-[0-9][0-9]*”server-access.2013\u 12\u 09.log 码头版本:8.1.8 在jetty.xml中设置: <New id="reques

我在Jetty上运行,我的访问日志配置为显示响应时间

今天,我注意到很少的请求(约60万个请求中的30个)具有负面响应时间,我想知道是否有人遇到过这种行为

以下是我的回答示例: --“POST HTTP/1.0”201461-18096

如果您想在访问日志中识别此项,这是我使用的grep命令:

grep--color“-[0-9][0-9]*”server-access.2013\u 12\u 09.log

码头版本:8.1.8

在jetty.xml中设置:

<New id="request-log-handler" class="org.eclipse.jetty.server.handler.RequestLogHandler">
<Set name="requestLog">
  <New class="org.eclipse.jetty.server.NCSARequestLog">
    <Arg>
      <Property name="logging.httpAccessLog" default="logs/app-access.yyyy_mm_dd.log" />
    </Arg>
    <Set name="retainDays">
      <Property name="logging.accessLogRetentionInDays" default="10" />
    </Set>
    <Set name="append">
      <Property name="logging.httpAccessLogAppend" default="true" />
    </Set>
    <!-- logs referer and user agent -->
    <Set name="extended">
      <Property name="logging.httpAccessLogExtended" default="false" />
    </Set>
    <!-- response time -->
    <Set name="logLatency">
      <Property name="logging.httpAccessLogLatency" default="true" />
    </Set>
  </New>
</Set>

使用Jetty 9.1.0

关键:

  • =在线可选/可配置条目
  • {name}
    =必填项
{X-Forwarded-For | | remote addr}-{authentication/principal/name}[{request timestamp}]“{method}{uri}{protocol}{response status code}{response content length}

其中:

  • 可以是请求/主机头
  • 可以是
  • 可以是或
  • 可以是
有趣的是,您的系统时钟似乎在请求期间进行了调整。整整18秒

这就是为什么这是领先的理论


先是,然后是,。如果存在负值,则可能是Jetty本身之外的内容重置了request.timeout,或者系统时钟已更改。

Jetty的哪个版本?(请具体说明),并在问题中包括如何配置访问日志记录。听起来这是一个合理的解释,因为:1。我看到所有的负数同时出现在“块”中;2.我有两台机器运行我的服务器,一台机器的负值约为5秒,另一台机器的负值约为18秒