From 8cb530230c13559e3cbb667ec0e4058cf74355d8 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 21 Jul 2020 23:39:21 -0400 Subject: [PATCH] fix docker SHM limited to 64mb chrome crash --- archivebox/util.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/archivebox/util.py b/archivebox/util.py index 76dc24e2..ea0abe32 100644 --- a/archivebox/util.py +++ b/archivebox/util.py @@ -186,8 +186,16 @@ def chrome_args(**options) -> List[str]: cmd_args += ('--headless',) if not options['CHROME_SANDBOX']: - # dont use GPU or sandbox when running inside docker container - cmd_args += ('--no-sandbox', '--disable-gpu') + # assume this means we are running inside a docker container + # in docker, GPU support is limited, sandboxing is unecessary, + # and SHM is limited to 64MB by default (which is too low to be usable). + cmd_args += ( + '--no-sandbox', + '--disable-gpu', + '--disable-dev-shm-usage', + '--disable-software-rasterizer', + ) + if not options['CHECK_SSL_VALIDITY']: cmd_args += ('--disable-web-security', '--ignore-certificate-errors')