xilution / xilution-selenium-grid

A Selenium Grid that Runs in AWS ECS Fargate.
https://www.xilution.com
Other
25 stars 14 forks source link

Fargate doesn't support docker shm parameter needed for stable Firefox and Chrome #8

Open simon-buxton-kg opened 6 years ago

simon-buxton-kg commented 6 years ago

In order to avoid random crashes it seems the Firefox and Chrome images need increased shared memory when running in a container, as per:

When executing docker run for an image with Chrome or Firefox please either mount -v /dev/shm:/dev/shm or use the flag --shm-size=2g to use the host's shared memory.

from https://github.com/SeleniumHQ/docker-selenium#running-the-images

However at the moment AWS Fargate doesn't support this:

sharedMemorySize The value for the size (in MiB) of the /dev/shm volume. This parameter maps to the --shm-size option to docker run. Note If you are using tasks that use the Fargate launch type, the sharedMemorySize parameter is not supported. Type: Integer

from https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_linuxparameters

Just wondering if anyone is actually seeing this problem when trying to use Fargate to run Selenium nodes?

simon-buxton-kg commented 6 years ago

These Firefox and Chrome bugs go into more detail about the problem:

https://bugs.chromium.org/p/chromium/issues/detail?id=519952

https://bugzilla.mozilla.org/show_bug.cgi?id=1338771#c10

alovak commented 6 years ago

You can disable using /dev/shm by passing --disable-dev-shm-usage option when you run Chrome.

https://bugs.chromium.org/p/chromium/issues/detail?id=736452

blopker commented 5 years ago

Is there an equivalent for Firefox?

taktakpeops commented 4 years ago

No, Firefox doesn't offer such a flag based on their documentation: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#How_to_use_command_options

harakiro commented 4 years ago

--disable-dev-shm-usage

Fixed it for me! Thank you!