Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Kite launches more browsers than specified #189

Open
ckmoga opened this issue Jul 23, 2021 · 3 comments
Open

Kite launches more browsers than specified #189

ckmoga opened this issue Jul 23, 2021 · 3 comments

Comments

@ckmoga
Copy link

ckmoga commented Jul 23, 2021

I am running headless chrome with the following setups:

"tupleSize": 25

java -Dwebdriver.chrome.driver=./chromedriver.exe -jar ../selenium.jar -role node -maxSession 25 -port 6001 -host localhost -hub http://localhost:4444/grid/register -browser browserName=chrome,version=91,platform=WINDOWS,maxInstances=25 --debug

What I noticed is when launched, Kite creates
125 Chrome sessions

When I change DEFAULT_MAXINSTANCES = 6 in org.webrtc.kite.config.client.Capability, the number of instances sessions jumps to 150
Changing DEFAULT_MAXINSTANCES to a lower value has no impact.

What I am expecting 25 sessions, one for each student, nothing more. What am I missing? This is a massive resource drain and causes 100% spike when more users are added.

@ckmoga ckmoga changed the title Kite launch more browsers than specified Kite launches more browsers than specified Jul 25, 2021
@A-nguyenv
Copy link
Contributor

Hello,
Changing DEFAULT_MAXINSTANCES shouldn't impact anything, as you are already running your grid through the command java -Dwebdriver.chrome.driver=./chromedriver.exe -jar ../selenium.jar -role node -maxSession 25 -port 6001 -host localhost -hub http://localhost:4444/grid/register -browser browserName=chrome,version=91,platform=WINDOWS,maxInstances=25 --debug.
It is only used to automate the launch of the grid, which is not available unless you implemented it on your side.
I tried to reproduce your issue but 25 browsers are opening, as expected.
Can you confirm from the grid console available from http://localhost:4444/grid/console that it is indeed 25 sessions?
image

@ckmoga
Copy link
Author

ckmoga commented Jul 27, 2021

Hi @A-nguyenv I did verify; visually you will see 25 browsers but there are far more processes:

Microsoft Windows [Version 10.0.19043.1083]
(c) Microsoft Corporation. All rights reserved.

C:\Users<Username>tasklist | find /I /C "chrome.exe"
125

You see the number of chrome processes is 125, which is 5x25.

This number is 0 when no tests are running, so it cannot come from something else. When I change DEFAULT_MAXINSTANCES = 6,
this number jumps to 150.

@novak-dev
Copy link

@ckmoga Hey, I am not sure if this is the problem but I see in Client.java there is a variable called count and its default value is set to 5. That might be causing some kind of unintended multiplication.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants