本机 mmap 错误
Native mmap error
在我的应用程序 运行 大约 5 - 6 小时后,我在 catalina.out
中不断收到以下错误:
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 503226 bytes for committing reserved memory.
An error report file with more information is saved as:
/tmp/hs_err_pid1.log
我在 AWS Linux t2.medium 实例(通用)中使用 tomcat 8 运行。只有 1 个应用程序 运行,根本没有其他应用程序。
有什么问题?
这是完整的pid log file
谢谢
当 OS 说有可用的虚拟内存时会发生这种情况,但稍后无法分配此内存。
我会确保您有足够的交换 space 并且您的 JVM(这不仅仅是您的堆大小)足够小,可以轻松地放入此实例中。
编辑:我可以看到
Memory: 4k page, physical 4047964k(101228k free), swap 0k(0k free)
这意味着您的机器只有 4 GB,没有交换空间,而且内存几乎用完了。你要么需要减少你的内存使用量(尽管我不太清楚你会怎么做)或者使用更多的内存,至少在你弄清楚如何减少你的消耗之前。
在我的应用程序 运行 大约 5 - 6 小时后,我在 catalina.out
中不断收到以下错误:
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 503226 bytes for committing reserved memory.
An error report file with more information is saved as:
/tmp/hs_err_pid1.log
我在 AWS Linux t2.medium 实例(通用)中使用 tomcat 8 运行。只有 1 个应用程序 运行,根本没有其他应用程序。 有什么问题?
这是完整的pid log file
谢谢
当 OS 说有可用的虚拟内存时会发生这种情况,但稍后无法分配此内存。
我会确保您有足够的交换 space 并且您的 JVM(这不仅仅是您的堆大小)足够小,可以轻松地放入此实例中。
编辑:我可以看到
Memory: 4k page, physical 4047964k(101228k free), swap 0k(0k free)
这意味着您的机器只有 4 GB,没有交换空间,而且内存几乎用完了。你要么需要减少你的内存使用量(尽管我不太清楚你会怎么做)或者使用更多的内存,至少在你弄清楚如何减少你的消耗之前。