Discussion:
[selenium-users] Max sessions
m***@numerator.com
2018-12-06 14:26:52 UTC
Permalink
Hello,

I was wondering what is the max sessions on a standalone docker image, if
any?

Specifically, I am using standalone-chrome:3.141.59-bismuth and was
wondering if it is limited to a maximum number of session or I can set
something in an environment variable like...

docker run -d -p 4444:4444 --name=selenium-grid -e NODE_MAX_SESSION=3 -v
/dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-bismuth

I want to run this docker on an ec2 instance and don't want it to kill the
instance by running too many sessions at the same time.

Mike
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/159a0711-c86f-461d-ad42-84225e7202ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diego Fernando Molina
2018-12-07 18:01:31 UTC
Permalink
Hi Mike,

The docker images are configured to run one browser per container, this
through the "maxSession" parameter, which is set to 1. The idea of it is to
isolate as much as possible the environment for every test.
Nevertheless, it is possible to overwrite that with the variable you
mention to any value that works for you,
see https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeBase/Dockerfile#L107

In the end, it is an exercise of finding the right number for your
environment. Some people run more than one session per container, some
don't, and this all depends on how much ram and cpu you have available.
Also how heave the website you are testing is.

Cheers,

Diego
Post by m***@numerator.com
Hello,
I was wondering what is the max sessions on a standalone docker image, if
any?
Specifically, I am using standalone-chrome:3.141.59-bismuth and was
wondering if it is limited to a maximum number of session or I can set
something in an environment variable like...
docker run -d -p 4444:4444 --name=selenium-grid -e NODE_MAX_SESSION=3 -v
/dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-bismuth
I want to run this docker on an ec2 instance and don't want it to kill the
instance by running too many sessions at the same time.
Mike
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b93efacc-976d-450e-8fc1-6ccae9a31bfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Yee
2018-12-07 18:22:03 UTC
Permalink
Hello Diego,

If I was to use a grid using a hub/node, there are ways to set the max
sessions.

In my case, if you run the standaone container and send tests to it, it is
not limited to one session.

Mike
Post by Diego Fernando Molina
Hi Mike,
The docker images are configured to run one browser per container, this
through the "maxSession" parameter, which is set to 1. The idea of it is to
isolate as much as possible the environment for every test.
Nevertheless, it is possible to overwrite that with the variable you
mention to any value that works for you, see
https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeBase/Dockerfile#L107
In the end, it is an exercise of finding the right number for your
environment. Some people run more than one session per container, some
don't, and this all depends on how much ram and cpu you have available.
Also how heave the website you are testing is.
Cheers,
Diego
Post by m***@numerator.com
Hello,
I was wondering what is the max sessions on a standalone docker image, if
any?
Specifically, I am using standalone-chrome:3.141.59-bismuth and was
wondering if it is limited to a maximum number of session or I can set
something in an environment variable like...
docker run -d -p 4444:4444 --name=selenium-grid -e NODE_MAX_SESSION=3 -v
/dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-bismuth
I want to run this docker on an ec2 instance and don't want it to kill
the instance by running too many sessions at the same time.
Mike
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/b93efacc-976d-450e-8fc1-6ccae9a31bfd%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/b93efacc-976d-450e-8fc1-6ccae9a31bfd%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABunHo4PyUffjkG%3D5-FqvccVdgcx-iPZfYxF1JKVAmiA%3D_KNqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
⇜Krishnan Mahadevan⇝
2018-12-10 07:59:44 UTC
Permalink
Michael,
Wouldn't you be better off with spawning a container that runs a selenium
standalone for every test and cleaning up the container after the test is
done, instead of trying to send all tests to the same standalone docker
instance ?

Docker has restful apis using which you should be able to do this easily.
All you would need to do is create a Wrapper around the browsers and in its
constructor, write logic to spin up a docker container that matches with
the capabilities, before delegating the call to the underlying constructor.

Of-course I am conveniently assuming that its Java that you are using.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening
or in love with someone else!"
Post by Michael Yee
Hello Diego,
If I was to use a grid using a hub/node, there are ways to set the max
sessions.
In my case, if you run the standaone container and send tests to it, it is
not limited to one session.
Mike
Post by Diego Fernando Molina
Hi Mike,
The docker images are configured to run one browser per container, this
through the "maxSession" parameter, which is set to 1. The idea of it is to
isolate as much as possible the environment for every test.
Nevertheless, it is possible to overwrite that with the variable you
mention to any value that works for you, see
https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeBase/Dockerfile#L107
In the end, it is an exercise of finding the right number for your
environment. Some people run more than one session per container, some
don't, and this all depends on how much ram and cpu you have available.
Also how heave the website you are testing is.
Cheers,
Diego
Post by m***@numerator.com
Hello,
I was wondering what is the max sessions on a standalone docker image,
if any?
Specifically, I am using standalone-chrome:3.141.59-bismuth and was
wondering if it is limited to a maximum number of session or I can set
something in an environment variable like...
docker run -d -p 4444:4444 --name=selenium-grid -e NODE_MAX_SESSION=3
-v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-bismuth
I want to run this docker on an ec2 instance and don't want it to kill
the instance by running too many sessions at the same time.
Mike
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/b93efacc-976d-450e-8fc1-6ccae9a31bfd%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/b93efacc-976d-450e-8fc1-6ccae9a31bfd%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CABunHo4PyUffjkG%3D5-FqvccVdgcx-iPZfYxF1JKVAmiA%3D_KNqQ%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CABunHo4PyUffjkG%3D5-FqvccVdgcx-iPZfYxF1JKVAmiA%3D_KNqQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnH6VRyj8jmj02u4-%2B8Jg01k2Mg6rppAS5kr8C1mFbmKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...