How to solve the problem of insufficient memory when running docker

Release: 2020-03-31 16:08:54
Original
6093 people have browsed it

How to solve the problem of insufficient memory when running docker

docker运行提示内存不够的解决方法:

1、saltstack的minion在运行过久之后,可能占用大量内存,需要将其重启。重启命令可能有时并不起作用。主要检查运行状态,如果未成功停止,则重新重启;

2、ELK日志收集程序或者其他java进程占用过高,用top和ps命令排查,谨慎确定进程的作用,在确保不影响业务的情况下,停止相关进程;

3、释放被占用的内存(buff/cache):   

$sync  #将内存数据写入磁盘
$echo 3 > /proc/sys/vm/drop_caches  #释放被占用的内存
Copy after login

4、有时候并不是buff/cache过高导致内存不够用,确实是被很多必要的进程消耗掉了内存,那就需要从机器资源分配使用的层面去考虑和解决了。

更多相关教程,请关注PHP中文网docker教程栏目。

The above is the detailed content of How to solve the problem of insufficient memory when running docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template