【发布时间】:2018-05-22 21:37:18
【问题描述】:
我在某些请求中遇到了这个问题。用户的所有第一次调用(或经过一段时间后)最多需要 60 秒才能完成。之后需要几毫秒。不管我是在 Internet 浏览器上还是使用 SOAP UI 调用它,它总是一样的。我在 Apache 上运行一个 java 应用程序。 我用 fiddler 运行它以查看调用花费最多时间的位置,看起来它介于服务器收到请求和开始应答之间,每次需要 61 秒。 Fiddler 还显示 SSL 握手在这两种情况下都需要毫秒
我不知道还能去哪里看。如果有人能提供一些启示,将不胜感激。
第一个请求(需要 1:01 分钟)
Request Count: 1
Bytes Sent: 683 (headers:683; body:0)
Bytes Received: 846 (headers:347; body:499)
ACTUAL PERFORMANCE
--------------
This traffic was captured on Friday, May 18, 2018.
ClientConnected: 16:21:17.244
ClientBeginRequest: 16:21:17.465
GotRequestHeaders: 16:21:17.465
ClientDoneRequest: 16:21:17.465
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 0ms
HTTPS Handshake: 0ms
ServerConnected: 16:21:17.275
FiddlerBeginRequest: 16:21:17.466
ServerGotRequest: 16:21:17.466
ServerBeginResponse: 16:22:18.597
GotResponseHeaders: 16:22:18.597
ServerDoneResponse: 16:22:18.599
ClientBeginResponse: 16:22:18.599
ClientDoneResponse: 16:22:18.599
Overall Elapsed: 0:01:01.133
RESPONSE BYTES (by Content-Type)
--------------
application/json: 499
~headers~: 347
后续请求(耗时 0.120 分钟)
Request Count: 1
Bytes Sent: 683 (headers:683; body:0)
Bytes Received: 846 (headers:347; body:499)
ACTUAL PERFORMANCE
--------------
This traffic was captured on Friday, May 18, 2018.
ClientConnected: 16:22:38.582
ClientBeginRequest: 16:22:38.607
GotRequestHeaders: 16:22:38.607
ClientDoneRequest: 16:22:38.607
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 0ms
HTTPS Handshake: 0ms
ServerConnected: 16:22:38.589
FiddlerBeginRequest: 16:22:38.607
ServerGotRequest: 16:22:38.607
ServerBeginResponse: 16:22:38.726
GotResponseHeaders: 16:22:38.726
ServerDoneResponse: 16:22:38.727
ClientBeginResponse: 16:22:38.727
ClientDoneResponse: 16:22:38.727
Overall Elapsed: 0:00:00.120
RESPONSE BYTES (by Content-Type)
--------------
application/json: 499
~headers~: 347
这是使用浏览器进行的另一个第一次调用的外观 Chrome Network Analysis
谢谢!!
【问题讨论】:
-
我怀疑这更适合serverfault.com
标签: java apache rest web-services