简体   繁体   English

卓:内存不足,Java Runtime Environment无法继续

[英]AWS: There is insufficient memory for the Java Runtime Environment to continue

I am running a 64bit Amazon Linux 2016.09 v2.5.2 running Tomcat 8 Java 8 environment on AWS Elasticbeanstalk free tier (Instance type: t1.micro ). 我正在AWS Elasticbeanstalk免费层(实例类型: t1.micro )上64bit Amazon Linux 2016.09 v2.5.2 running Tomcat 8 Java 8环境的64bit Amazon Linux 2016.09 v2.5.2 running Tomcat 8 Java 8 t1.micro

I have a number of RESTful services, when one particular service is called, that does some work, I consistently get a 502 error , and the following in the logs: 我有许多RESTful服务,当调用一个特定的服务时,它可以完成一些工作,并且始终出现502 error ,并且在日志中显示以下内容:

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e2220000, 130215936, 0) failed; OpenJDK 64位服务器VM警告:INFO:os :: commit_memory(0x00000000e2220000,130215936,0)失败; error='Cannot allocate memory' (errno=12) 错误='无法分配内存'(errno = 12)

There is insufficient memory for the Java Runtime Environment to continue. 没有足够的内存,Java运行时环境无法继续。 Native memory allocation (mmap) failed to map 130215936 bytes for committing reserved memory. 本机内存分配(mmap)无法映射130215936字节以提交保留的内存。 An error report file with more information is saved as: /tmp/hs_err_pid31500.log OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64m; 包含更多信息的错误报告文件另存为:/tmp/hs_err_pid31500.log OpenJDK 64位服务器VM警告:忽略选项MaxPermSize = 64m; support was removed in 8.0 在8.0中删除了支持

Question

Does this mean I need to upgrade to a payed version, ie greater than Instance type: t1.micro ? 这是否意味着我需要升级到付费版本,即大于实例类型: t1.micro

Or, is there a way I can configure my environment to handle this? 或者,是否可以配置我的环境来处理此问题?

The reason I ask, is because the logs above indicate that the Java App is requiring only 130mb ( 130215936 bytes ) of memory, where below you can see the JVM heap size is a lot larger. 我问的原因是因为上面的日志表明Java App只需要130mb130215936 bytes )的内存,在下面您可以看到JVM heap大小要大得多。 So I would not have expected it to fall over at 130mb . 所以我不希望它跌落到130mb

More Info 更多信息

I do have the following configurations settings: 我确实具有以下配置设置:

在此处输入图片说明

Thanks 谢谢

UPDATE UPDATE

I change the Max JVM to 256mb , but still get the error: 我将Max JVM更改为256mb ,但仍然收到错误:

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; OpenJDK 64位服务器VM警告:忽略选项MaxPermSize = 256m; support was removed in 8.0 OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 89456640, 0) failed; 8.0 OpenJDK 64位服务器VM中的支持已删除警告:INFO:os :: commit_memory(0x00000000c0000000,89456640,0)失败; error='Cannot allocate memory' (errno=12) 错误='无法分配内存'(errno = 12)

There is insufficient memory for the Java Runtime Environment to continue. 没有足够的内存,Java运行时环境无法继续。 Native memory allocation (mmap) failed to map 89456640 bytes for committing reserved memory. 本机内存分配(mmap)无法映射89456640字节以提交保留的内存。 An error report file with more information is saved as: /tmp/hs_err_pid14014.log OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; 包含更多信息的错误报告文件另存为:/tmp/hs_err_pid14014.log OpenJDK 64位服务器VM警告:忽略选项MaxPermSize = 256m; support was removed in 8.0 在8.0中删除了支持

But here it falls over on only 89mb . 但是这里只有89mb

According to the error message in your update, it seems like you tried to adjust the JVM permanent generation size. 根据更新中的错误消息,您似乎试图调整JVM永久代大小。 Try to leave this setting to whatever the default is. 尝试将此设置保留为默认值。 Instead, set both the initial and the maximum heap size to 64mb. 而是将初始堆大小和最大堆大小都设置为64mb。

If it is still crashing, once it crashed, you can ssh to the AWS instance and look at what is using the memory. 如果它仍然崩溃,一旦崩溃,您可以使用SSH到AWS实例,并查看正在使用什么内存。 In beanstalk, in the configurations of your environment, under "Instances", you can select the keypair you want to use with your instances. 在beanstalk中,在环境的配置中的“实例”下,您可以选择要用于实例的密钥对。 You can find the instances launched by beanstalk in the EC2 console, like any other instance. 您可以在EC2控制台中找到beantalk启动的实例,就像其他任何实例一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java 运行时环境的内存不足,无法继续 - insufficient memory for the Java Runtime Environment to continue 没有足够的内存让Java Runtime Environment继续运行 - There is insufficient memory for the Java Runtime Environment to continue Cloudera内存不足,无法继续Java Runtime Environment - Cloudera insufficient memory for the Java Runtime Environment to continue 内存不足,无法运行Java Runtime环境 - Insufficient memory to run Java Runtime environment to continue Java Runtime Environment 内存不足,无法继续hbase - There is insufficient memory for the Java Runtime Environment to continue hbase kafka 8 和内存 - Java 运行时环境的内存不足,无法继续 - kafka 8 and memory - There is insufficient memory for the Java Runtime Environment to continue 运行Hadoop:内存不足,无法继续Java Runtime Environment - Running Hadoop: insufficient memory for the Java Runtime Environment to continue YARN上的Spark流-没有足够的内存供Java运行时环境继续 - Spark Streaming on YARN - There is insufficient memory for the Java Runtime Environment to continue Tomcat崩溃:Java Runtime Environment没有足够的内存来继续 - Tomcat crash: There is insufficient memory for the Java Runtime Environment to continue JBoss 和 Eclipse 错误:ZD52387880E2D213817A7 的 memory 运行时环境不足 - JBoss and Eclipse error : Insufficient memory for the Java Runtime Environment to continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM