This repository was archived by the owner on Jul 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 646
This repository was archived by the owner on Jul 9, 2023. It is now read-only.
Time taken to create server connection is sometimes far greater than it should be #495
Copy link
Copy link
Closed
Labels
Description
I think this is related to #486 and #466 but opening a new issue because I've pinpointed a problem.
I decided to log the times in TimeLine to the console and I noticed that the difference between Request Received and Server Connection Created can run from 3-20 seconds.
Excerpt from the log:
Session Created=00:00:00
Request Received=00:00:00.0000349
After invokeBeforeRequest=00:00:01.2515124
After prefetchTask if=00:00:01.2515139
After GetConnectionCacheKey=00:00:01.2515147
After generator creation=00:00:01.2515151
Server Connection Created=00:00:43.6580544
Session Created=00:00:00
Request Received=00:00:00.0000410
After invokeBeforeRequest=00:00:00.0004671
After prefetchTask if=00:00:00.0004679
After GetConnectionCacheKey=00:00:00.0004690
After generator creation=00:00:00.0004690
Server Connection Created=00:00:21.2557844
Session Created=00:00:00
Request Received=00:00:00.0000345
After invokeBeforeRequest=00:00:00.0004029
After prefetchTask if=00:00:00.0004033
After GetConnectionCacheKey=00:00:00.0004040
After generator creation=00:00:00.0004040
Server Connection Created=00:00:21.3582822
Session Created=00:00:00
Request Received=00:00:00.0000345
After invokeBeforeRequest=00:00:00.0004360
After prefetchTask if=00:00:00.0004363
After GetConnectionCacheKey=00:00:00.0004371
After generator creation=00:00:00.0004371
Server Connection Created=00:00:21.1989975
Session Created=00:00:00
Request Received=00:00:00.0000349
After invokeBeforeRequest=00:00:00.0004177
After prefetchTask if=00:00:00.0004185
After GetConnectionCacheKey=00:00:00.0004189
After generator creation=00:00:00.0004192
Server Connection Created=00:00:21.3541475
Session Created=00:00:00
Request Received=00:00:00.0000345
After invokeBeforeRequest=00:00:00.0004436
After prefetchTask if=00:00:00.0004443
After GetConnectionCacheKey=00:00:00.0004447
After generator creation=00:00:00.0004451
Server Connection Created=00:00:42.4095211
Session Created=00:00:00
Request Received=00:00:00.0000406
After invokeBeforeRequest=00:00:00.0004135
After prefetchTask if=00:00:00.0004139
After GetConnectionCacheKey=00:00:00.0004147
After generator creation=00:00:00.0004151
Server Connection Created=00:00:42.1948350
Session Created=00:00:00
Request Received=00:00:00.0000342
After invokeBeforeRequest=00:00:00.0004200
After prefetchTask if=00:00:00.0004204
After GetConnectionCacheKey=00:00:00.0004208
After generator creation=00:00:00.0004211
Server Connection Created=00:00:42.1896435
Session Created=00:00:00
Request Received=00:00:00.0000357
After invokeBeforeRequest=00:00:00.0004299
After prefetchTask if=00:00:00.0004303
After GetConnectionCacheKey=00:00:00.0004306
After generator creation=00:00:00.0004310
Server Connection Created=00:01:03.3936918
Those four After --- I have added in my dev version.
I haven't dug into whether it's the TcpClient() constructor or the ConnectAsync() function yet.
Do you have any ideas on what could be causing this?