通过环境属性在弹性豆秆中进行Xmx设置 [英] Xmx settings in elasticbean stalk through environment properties

查看:88
本文介绍了通过环境属性在弹性豆秆中进行Xmx设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在环境设置中使用值-Xms1G -Xmx3G的JAVA_OPTS来增加我的Elastic beantalk控制台的内存.附件是我如何更改设置的图像.应用更改并重新启动vm之后,我看不到服务器上反映的更改.

I had been trying to up the memory of my elastic beanstalk console using JAVA_OPTS in environment settings with values -Xms1G -Xmx3G. Attached is the image on how I have changed the settings. AFter applying the changes and restarting the vm, I do not see the changes refelcted on the server.

这就是我的验证方式

sudo jmap -heap

sudo jmap -heap

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 1035993088 (988.0MB)
   NewSize                  = 21495808 (20.5MB)
   MaxNewSize               = 344981504 (329.0MB)
   OldSize                  = 43515904 (41.5MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 192413696 (183.5MB)
   used     = 18710296 (17.843528747558594MB)
   free     = 173703400 (165.6564712524414MB)
   9.723993867879342% used
From Space:
   capacity = 26738688 (25.5MB)
   used     = 22166296 (21.139427185058594MB)
   free     = 4572392 (4.360572814941406MB)
   82.89971445121017% used
To Space:
   capacity = 27262976 (26.0MB)
   used     = 0 (0.0MB)
   free     = 27262976 (26.0MB)
   0.0% used
PS Old Generation
   capacity = 691011584 (659.0MB)
   used     = 571332904 (544.8655166625977MB)
   free     = 119678680 (114.13448333740234MB)

推荐答案

不能通过环境属性设置堆设置.您必须通过Procfile给出它.升级时,必须将procfile捆绑在一起.我必须创建一个包含war和Procfile的zip文件.Proc文件内容

Heap settings cannot be set through environment properties. You have to give this via Procfile. The procfile has tobe bundled when uplaoding. I had to created a zip file that had war and Procfile. Proc file contents

web: java -jar -Xms1G -Xmx3G application.war

如何测试此作品?从顶部找到您的webapp/java进程的进程ID.使用jmap堆-获取堆分配.我在AWS-Ec2上测试了弹性beantalk

How to test this works? Find the process id of your webapp/java process from top. Use jmap heap - to get the heap allocation. I tested this on AWS-Ec2 for elastic beanstalk

这篇关于通过环境属性在弹性豆秆中进行Xmx设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆