Skip to content

[🐛 Bug]: chart - autoscaling too many browser nodes #2160

Closed
@ofirdassa9

Description

@ofirdassa9

What happened?

I run a simple selenium test that gets a remote driver from the hub and goes to facebook.com and then to google.com
As long as the test is live (doesn't matter if it's sleeping, or actually doing something), more and more chrome-nodes are being deployed (I tried Firefox and Edge as well, I get the same result), until there are 8 which is the default limit.
I use Keda that is install with the chart and not an existing one.
This happens also in my EKS and my docker-desktop clusters
I used port-forward to reach out the hub service from my browser
the python script of the test:

import time
from selenium import webdriver

# URL for the remote Chrome WebDriver
remote_url = "http://automation:automation@localhost:4444/wd/hub"  # Replace this with the actual URL of your remote WebDriver

# Setting up the Chrome options
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")

# Getting the remote WebDriver
driver = webdriver.Remote(remote_url, options=chrome_options)

# Navigating to Facebook
driver.get("https://www.facebook.com")

# Printing the title of the page
print("Title of the page:", driver.title)

driver.get("https://www.google.com")

# Printing the title of the page
print("Title of the page:", driver.title)
# Closing the WebDriver
time.sleep(60)
driver.quit()

my values.yaml:

basicAuth:
  username: "automation"
  password: "automation"

autoscaling:
  enabled: true

Command used to start Selenium Grid with Docker (or Kubernetes)

helm install selenium-grid -n selenium-grid docker-selenium/selenium-grid -f values.yaml --create-namespace

Relevant log output

no relevant output logs

Operating System

EKS, Docker desktop

Docker Selenium version (image tag)

4.18.1-20240224

Selenium Grid chart version (chart version)

0.28.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-autoscaling-k8sIssue relates to autoscaling in Kubernetes, or the scaler in KEDA

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions