ClientTests hang on CI
tjaskula opened this issue · 2 comments
tjaskula commented
Needs further investigation why sometimes TestThatLoadBalancingClientDelivers
and TestThatRoundRobinClientDelivers
hangs on Appveyor and Travis CI.
The passing one is Ubuntu
image. macOS, windows fail
tjaskula commented
Apparently there is some contention on Visual Studio 2019
image on Appveyor. Reducing to 3 clients, there is an output which clearly shows big delays between different requests:
vlingo/http: Generating handler dispatcher for main: UserResource
consoleLogger[Debug]: vlingo-net/actors: Generating proxy for main: IScheduled`1
consoleLogger[Info]: ServerRequestResponseChannelActor: OPENING PORT: 8088
consoleLogger[Info]: Server vlingo-http-server is listening on port: 8088 started in 211.994873046875 ms
consoleLogger[Info]: Resource: user
consoleLogger[Info]: Action: id=0, method=POST, uri=/users, to=Register(Vlingo.Http.Tests.Sample.User.UserData userData)
consoleLogger[Info]: Action: id=1, method=PATCH, uri=/users/{userId}/contact, to=ChangeContact(string userId, Vlingo.Http.Tests.Sample.User.ContactData contactData)
consoleLogger[Info]: Action: id=2, method=PATCH, uri=/users/{userId}/name, to=ChangeName(string userId, Vlingo.Http.Tests.Sample.User.NameData nameData)
consoleLogger[Info]: Action: id=3, method=GET, uri=/users/{userId}, to=QueryUser(string userId)
consoleLogger[Info]: Action: id=4, method=GET, uri=/users, to=QueryUsers()
consoleLogger[Info]: Action: id=5, method=GET, uri=/users/{userId}/error, to=QueryUserError(string userId)
Starting timer...
consoleLogger[Info]: Socket connected to 127.0.0.1:8088
consoleLogger[Info]: Socket connected to 127.0.0.1:8088
consoleLogger[Info]: Socket connected to 127.0.0.1:8088
Start consuming...2/3/2020 10:31:50 PM
ID: 1 | Elapsed 1.1568961s
Stop consuming...2/3/2020 10:31:50 PM
Start consuming...2/3/2020 10:31:51 PM
ID: 2 | Elapsed 0.841094s
Stop consuming...2/3/2020 10:31:51 PM
Start consuming...2/3/2020 10:31:53 PM
ID: 3 | Elapsed 1.8152096s
Stop consuming...2/3/2020 10:31:53 PM
Start consuming...2/3/2020 10:32:00 PM
ID: 1 | Elapsed 7.0290327999999995s
Stop consuming...2/3/2020 10:32:00 PM
Start consuming...2/3/2020 10:32:23 PM
ID: 2 | Elapsed 22.8926767s
Stop consuming...2/3/2020 10:32:23 PM
Start consuming...2/3/2020 10:33:08 PM
ID: 3 | Elapsed 44.741964599999996s
Stop consuming...2/3/2020 10:33:08 PM
44s for the last one, and 22 for the before last one.
Not sure what is causing those delays and how to replicate that, because as far as I've tested on Windows and OS X everything works fine.
tjaskula commented
This was just a symptom of other issues. Observed directly in vlingo-net-http
but caused by vlingo-net-wire
:
- Useless synchronization primitives in
vlingo-net-wire
checking if the channel is still connected. This was very slow as locking occurred too often. It was fixed here -> vlingo-net/xoom-net-wire@3f847c4 by removing the whole code.