Help with running under AWS ECS
Hopefully someone else has seen this and can help me. I'm trying to run this as a docker image under AWS ECS. I'm using chrome-remote-interface to have it load a webpage so I can screen shot it using Page.navigate({url}). This use to work fine with https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-38/stable-headless-chromium-amazonlinux-2017-03.zip but with the later versions when I send the command to chrome I get a stack trace similar to:
Received signal 7 BUS_ADRERR 7fa8bc903000
#0 0x0000035d34fc
Docker file is very basic. Just based on adieuadieu/headless-chromium-for-aws-lambda
Has anyone experienced anything similar and know how to fix it?
Hi tspiva, I might have a solution for you since I have been struggling with something similar today.
Version 38 is the last version based on chromium 64. In chromium 65 this important change happened.
They have finally added an official flag for shared memory management. The flag is --disable-dev-shm-usage.
I think @adieuadieu will have to adjust his automatic build to incorporate this change. The memory hack described in How to get headless Chrome running on AWS Lambda should not be needed anymore and this flag should be included in preset chrome flags.
To sum up, make sure to run chromium with this flag.
Hope it helps, Jan
That worked perfectly! Thanks for the help.
--disable-dev-shm-usage was added in v1.0.0-45. Future Chromium builds will no longer include the /dev/shm hack.