You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, we'd like using connection pool to optimize system performance. For resty v3, SetTransport allows us to set max connection. However, it doesn't work. For example:
====== test 1 ======
Request Trace Info:
DNSLookup : 7.926584ms
ConnTime : 383.178667ms
TCPConnTime : 374.85325ms
TLSHandshake : 0s
ServerTime : 264.704667ms
ResponseTime : 108.208µs
TotalTime : 647.653292ms
IsConnReused : false
IsConnWasIdle : false
ConnIdleTime : 0s
response status: 200 OK
====== test 2 ======
<------ Hang at here. I can only force the process to be killed
Expectedly, the second time, TCPConn should be reused. But it doesn't, it will hang before the second time to call client.R().Get().
What's interesting is that if enable client.SetDebug(true) at the line 17 everything will meet expectations:
Usually, we'd like using connection pool to optimize system performance. For resty v3,
SetTransport
allows us to set max connection. However, it doesn't work. For example:Stdout:
Expectedly, the second time, TCPConn should be reused. But it doesn't, it will hang before the second time to call
client.R().Get()
.What's interesting is that if enable
client.SetDebug(true)
at the line 17 everything will meet expectations:As expected, the second time that
IsConnReused
is true.Anybody explains that? All my need is reuse connection without enable debug.
The text was updated successfully, but these errors were encountered: