在 VPS/Burstnet 上安装运行 Tomcat
启动 JVM 的最低内存要求是多少? 我有最便宜的VPS Burstnet(512mb内存)并安装了java。 当我输入 java 时,它显示
$java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
当我输入 top 时,仍有大约 400MB 可用内存。
支持人员告诉我唯一的解决方案是增加我的记忆力,我怀疑他的建议。如果是内存不足引起的,我尝试创建交换文件,但是由于我的 VPS 运行在 OpenVS 上,所以不允许交换文件,而 OpenVs 不允许交换文件。 http://writereadspread.blogspot.com/2010/08/swap- on-vpsopenvs.html
如果您能回答以下任何问题,我将不胜感激:
问题的原因是什么?
安装 JRE 和 JDK 的最低内存要求是多少?
如果您在 VPS 上运行 Java 应用程序,您的内存是多少?您使用的是哪台主机?
What is the minimum memory requirement to start JVM?
I have the cheapest VPS Burstnet (512mb memory) and installed java.
When I type java, it says
$java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
When I type top, there is still around around 400MB free memory.
The support tells me the only solution is to increase my memory, I doubt his suggestion. In case it is caused by insufficient memory,I tried to create a swap file, however swap file is not allowed due to my VPS runs on OpenVS, and OpenVs does not allow swap files. http://writereadspread.blogspot.com/2010/08/swap-on-vpsopenvs.html
I would be very much appreciated if you can answer any of the following questions:
What is the cause of the issue?
What is the minimum memory requirement for installing JRE and JDK?
If u r running java apps on VPS, what is your memory, and which host r u using?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 VPS 上运行 Tomcat:
* 如果安装了 openjkd,请卸载
* 安装sun-java Linux安装
* 安装tomcat
* 运行
export JAVA_OPTS="-XX:MaxPermSize=64m -Xms16M -Xmx64m"
* 启动Tomcat
./startup.sh
To run Tomcat on VPS:
* if openjkd installed, uninstall
* install sun-java linux installation
* install tomcat
* run
export JAVA_OPTS="-XX:MaxPermSize=64m -Xms16M -Xmx64m"
* start Tomcat
./startup.sh