chrome-docker icon indicating copy to clipboard operation
chrome-docker copied to clipboard

Tab crash/close (memory issue?)

Open timekills opened this issue 5 years ago • 1 comments

Issue: Certain tabs - specifically Google app store, some video playing, other "high use/high memory" tabs - will begin to open and immediately crash the tab Example: https://chrome.google.com/webstore Repeatable.

Question: Is there a way to increase allowed memory usage for Chrome in this Docker build?

Error log: `[494:502:0131/235140.848732:ERROR:broker_posix.cc(46)] Received unexpected number of handles

[778:7:0131/235140.910113:ERROR:broker_posix.cc(46)] Received unexpected number of handles

[778:7:0131/235140.910186:FATAL:memory.cc(22)] Out of memory. size=524288`

timekills avatar Jan 31 '20 23:01 timekills

Found the following https://stackoverflow.com/questions/56218242/headless-chromium-on-docker-fails

This is handled by /dev/shm which is set to a default of 64mb in Docker, which isn't that much for modern web applications.

For context on /dev/shm see here https://superuser.com/questions/45342/when-should-i-use-dev-shm-and-when-should-i-use-tmp

Option 1: Run chrome with --disable-dev-shm-usage

Option 2: Set /dev/shm size to a reasonable amount docker run -it --shm-size=1g replacing 1g with whatever amount you want.

I tried Option 2 which worked for me when run from a terminal

lee-staples avatar Mar 27 '20 09:03 lee-staples