vps交流

[疑问] 【docker】unable to apply cgroup configuration


试图根据 https://blog.laoda.de/archives/docker-compose-install-searxng 部署 searxng ,在 docker-compose up -d   后报错:

  1. Creating redis …
  2. Creating searxng … error
  3. Creating redis   … errore to apply cgroup configuration: mkdir /sys/fs/cgroup/memory/docker/ac59c98a02d4bbfc0ef0793d7c2179de23d34302f4bdb8ee8a9f26883e9855aa: cannot allocate memory: unknown
  4. ERROR: for redis  Cannot start service redis: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: mkdir /sys/fs/cgroup/memory/docker/a8fb0eb3a6865509a739cc9253d2a24f0ce4ea14c9eaf60ebe6209f3d9e80b2f: cannot allocate memory: unknown
  5. ERROR: for searxng  Cannot start service searxng: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: mkdir /sys/fs/cgroup/memory/docker/ac59c98a02d4bbfc0ef0793d7c2179de23d34302f4bdb8ee8a9f26883e9855aa: cannot allocate memory: unknown
  6. ERROR: for redis  Cannot start service redis: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: mkdir /sys/fs/cgroup/memory/docker/a8fb0eb3a6865509a739cc9253d2a24f0ce4ea14c9eaf60ebe6209f3d9e80b2f: cannot allocate memory: unknown
  7. ERROR: Encountered errors while bringing up the project.

复制代码

根据 Cannot allocate memory ,认为可能是进程数超限导致,于是查看实例内存使用率是否过高

  1. [email protected]:~/data/docker_data/searxng/searxng-docker# sysctl  -a | grep pid_max
  2. kernel.pid_max = 32768
  3. [email protected]:~/data/docker_data/searxng/searxng-docker# pstree -p | wc -l
  4. 68

复制代码

总进程数似乎未达到 pid_max。请问神通的mjj,这是哪里出了问题?