英文:
AWS Elastic Beanstalk - Setting JVM Options (Heapspace)
问题
好的。
我在AWS Elastic Beanstalk上运行一个Java应用程序。我需要增加堆空间,通常我会通过 -Xmx 和 -Xms 来实现。
我如何在AWS上完成这个任务?
我以最简单的方式部署 - 上传一个jar文件并运行它。我在这里已经找到了这个解决方案:
将Procfile与我的.jar文件一起打包成.zip文件在部署时被接受,但没有任何变化。我真的没有更多的想法,有人可以帮忙吗?
英文:
Good day.
I am running a Java Application on AWS Elastic Beanstalk. I have to increase the heapspace, normally I would do so via -Xmx and Xms.
How do I accomplish this on AWS?
I'm deploying it in the most simple way possible - uploading a jarfile and running it. I've already found this solution on here:
Putting a Procfile into a .zip together with my .jar is accepted when deploying but changes nothing. I really am out of ideas, can anyone help?
答案1
得分: 8
在尝试了几种不同的方法后(.Config文件或位于.zip中的Procfile,更改Serverside JVM的默认堆大小以及向beanstalk配置添加JAVA_OPTS),最终成功了。
不要使用“JAVA_OPTS”,只需添加
“_JAVA_OPTIONS”
并将值设置为
“-Xmx[size]m”([size]代表所需堆大小的字节表示)
到您的Beanstalk环境的配置中;它位于
“配置” -> “软件” -> “环境属性”。
希望这能为某人节省我用来找到答案的时间。
英文:
After trying several different things (.Config file or Procfile in .zip, changing the Serverside JVM's default heap size and Adding JAVA_OPTS to beanstalk configuration) it finally worked out.
Instead of "JAVA_OPTS", simply add
"_JAVA_OPTIONS"
with the value
"-Xmx[size]m" ([size] representing the desired heap size in bytes)
to your Beanstalk Environment's Configurations; it's found under
"Configuration"->"Software"->"Environment Properties".
I hope this will save someone the time it took me to find out.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论