Help us understand the problem. What is going on with this article?

Dockerコンテナ上のChromeの動きが悪い時の対応方法

More than 1 year has passed since last update.
  • 環境(Dockerコンテナ)
    • CentOS Linux release 7.6.1810 (Core)
    • Google Chrome:バージョン: 75.0.3770.80(Official Build) (64 ビット)
      • Googleアカウントにログインして同期済

事象:Chromeでなかなかページを表示できなくてタブを2つ開くと落ちる

image.png

原因:メモリが不足しているから

メモリ不足っぽいからメモリを見たい時に使ってみるコマンド - Qiita

コマンドでChromeを起動してみる

# Chromeを起動する
$ /opt/google/chrome/chrome
[12536:12592:0613/104137.316187:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
[12567:12567:0613/104137.444963:ERROR:sandbox_linux.cc(368)] InitializeSandbox() called with multiple threads in process gpu-process.
[12536:12536:0613/104137.783170:ERROR:pref_model_associator.cc(111)] Failed to deserialize value of preference 'autofill_profile_validity': Line: 2, column: 2, Unexpected token.
# ページが表示されない・・・
[103:106:0613/104149.229263:ERROR:validation_errors.cc(76)] Invalid message: VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 1)
[103:111:0613/104149.229513:FATAL:memory.cc(22)] Out of memory. size=4194304
[12536:12536:0613/104421.877311:FATAL:memory.cc(22)] Out of memory. size=131072
[12571:12595:0613/104422.007226:ERROR:broker_posix.cc(43)] Invalid node channel message
[12571:12595:0613/104422.008593:ERROR:broker_posix.cc(106)] Error sending sync broker message: Broken pipe (32)
# タブを2つ目のタブを開いてページを表示しようとしたら落ちた
Trace/breakpoint trap (core dumped)

対応1:メモリを節約しながら使う

対応2:Chromeが使う/dev/shmのサイズを増やす

ponsuke0531
びっくりするほど物覚えが悪いが、エンジニアを目指しています。
http://ponsuke-tarou.hatenablog.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away