Skip to content

[Feature Request] remove hard coded "Connection: Close" for using persistent connection with geckodriver #6341

@astmaih

Description

@astmaih

Meta -

OS: Windows Server

Selenium Version: 3.14.0

Browser: Firefox

Browser Version: 61.0

because geckodriver in verion 0.21.0 now supports http keep_alive connections, the selenium standalone server should now also support keep_alive connections to avoid TCP connection spamming. For this, i kindy request to remove the hard coded "Connection: close" code from PassThrough.java:


connection.setRequestProperty("Connection", "close");

or, at least, make keep_alive connections configurable.

Expected Behavior -

for one running test, the connection from the Selenium Server to the geckodriver should be persistent and be reused.

Actual Behavior -

For every command sended from the test to the browser, the selenium server opens a new tcp connection. After opening and using for one single command, every Connection stays in the TIME_WAITE state for 4 minutes. For complex selenium tests (using 3 parallel test-builds with more than 30 tests each build), after some time we get more than 5000 connections at the keep_alive state and sometimes the following error when the selenium server tries to open a new connection for the next command:

10:38:19.214 INFO - I/O exception (java.net.BindException) caught when processing request to {}->http://127.0.0.1:7057: Address already in use: connect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions