chromium crashes with VNC_RESOLUTION=1920x1080 (too small space on `/dev/shm`)
raghavkarol opened this issue · 5 comments
Thx @raghavkarol for the hint. I can't reproduce the error in the current version. It's still a problem? I tried:
docker run -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser https://labs.consol.de
and all works fine. If so, can you please provide the commands to reproduce the error?
Sure, e.g., http://map.norsecorp.com
and some other heavy URLs crash chromium and chrome.
The command below consistently crashes chrome:
docker run -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/
while this works:
docker run -it -v /dev/shm:/dev/shm -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/
@raghavkarol Ok I took a look at it and the error is reproducible. Due to the fact that our images are not designed to run as root
see #3 we can't adjust our startup script to your mentioned solution.
In my opinion the best way for this is to set the flag docker run -it --shm-size=256m
like described at: https://stackoverflow.com/questions/30210362/how-to-increase-the-size-of-the-dev-shm-in-docker-container.
To prevent that others will fall into this issue, I will add a hint at the README.md
.
This should work also for you, or?
docker run --shm-size=256m -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/
patch for kubernetes to fix shm size
livenessProbe:
tcpSocket:
port: 5901
initialDelaySeconds: 1
timeoutSeconds: 1
### checks if http-vnc connection is working
readinessProbe:
httpGet:
path: /
port: 6901
scheme: HTTP
initialDelaySeconds: 1
timeoutSeconds: 1
volumeMounts:
- mountPath: /dev/shm
name: shm
volumes:
- name: shm
emptyDir:
sizeLimit: 1024Mi
medium: Memory
I've found another solution for this issue. Both Chromium and Chrome support --disable-dev-shm-usage flag. So there's no need to raise the shm-size.