maridb log 如下: 161003 3:45:07 [Warning] IP address '121.28.142.136' could not be resolved: Name or service not known 161003 3:45:07 [Warning] IP address '121.28.142.138' could not be resolved: Name or service not known 161003 3:45:08 [Warning] IP address '121.28.142.133' could not be resolved: Name or service not known 161003 7:05:41 [Warning] IP address '69.165.72.94' could not be resolved: Name or service not known 161003 11:37:43 [Warning] IP address '123.249.3.155' could not be resolved: Name or service not known 161003 12:28:12 [Warning] IP address '121.199.70.200' could not be resolved: Name or service not known 161004 0:10:16 [Warning] IP address '139.224.53.6' could not be resolved: Name or service not known 161004 0:19:28 [Warning] IP address '124.173.113.45' could not be resolved: Name or service not known 161004 00:38:31 mysqld_safe Number of processes running now: 0 161004 00:38:31 mysqld_safe mysqld restarted 161004 0:38:31 [Note] /usr/libexec/mysqld (mysqld 5.5.50-MariaDB) starting as process 27071 ... 161004 0:38:31 [Warning] Changed limits: max_open_files: 1024 max_connections: 214 table_cache: 400 161004 0:38:31 InnoDB: The InnoDB memory heap is disabled 161004 0:38:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins 161004 0:38:31 InnoDB: Compressed tables use zlib 1.2.7 161004 0:38:31 InnoDB: Using Linux native AIO 161004 0:38:31 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137756672 bytes) failed; errno 12 161004 0:38:31 InnoDB: Completed initialization of buffer pool 161004 0:38:31 InnoDB: Fatal error: cannot allocate memory for the buffer pool 161004 0:38:31 [ERROR] Plugin 'InnoDB' init function returned error. 161004 0:38:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 161004 0:38:31 [ERROR] mysqld: Out of memory (Needed 128917504 bytes) 161004 0:38:31 [ERROR] mysqld: Out of memory (Needed 96681984 bytes) 161004 0:38:31 [ERROR] mysqld: Out of memory (Needed 72499200 bytes) 161004 0:38:33 [Note] Plugin 'FEEDBACK' is disabled. 161004 0:38:33 [ERROR] Unknown/unsupported storage engine: InnoDB 161004 0:38:33 [ERROR] Aborting
@Famio 进程有一个「使用内存」和一个「申请内存」。 你平时看到的进程内存占用都是「使用内存」,但是触发 Kill 的却是「申请内存」。 所以你会发现明明内存还有空余,却报内存不足。 Linux 和 Windows 都是这样子的。 Windows 你可以看有个提交内存, Commit Charge ,这个就是「申请内存」。 如果 Windows 下不开分页文件,那么申请内存就等于物理内存,这种情况下内存还没用满就会提前导致系统去杀进程了。 Linux 有个内核参数可以控制 Over Commit ,有兴趣的话可以当做扩展阅读。 https://www.kernel.org/doc/Documentation/vm/overcommit-accounting
julyclyde
2016-10-04 17:28:56 +08:00
@msg7086 申请如果还能活着失败,说明是被内核的 over commit 给限制的;如果是使用超限,进程根本不会有感知,直接就上天了,内核日志记录 oom-killer
realpg
2016-10-05 13:05:53 +08:00
@Famio 在你的 MYSQL 配置文件里加一句 performance_schema = OFF 内存问题就解决了, 512M 内存也可以愉快的使用了
第 1 页 / 共 1 页
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。