#271  How to limit heap memory ?(请问如何限制oneDev的最大堆内存?)
Closed
lainnetwork opened 3 years ago

您好,我是使用容器方式启动OneDev的,版本为4.0.9,我想在onedev启动时添加jvm参数用于限制其最大内存,控制其内存占服务器总内存的比重。 我尝试过去阅读镜像里的entrypoint.sh,但发现最后是执行了wrapper-linux-x86-64,然后在/app/conf/wrapper.conf下发现了

wrapper.java.maxmemory.percent=60

看上去是默认最大值为60%的物理内存,但这种启动方式我不是很了解,也不知道应该如何在启动镜像的时候改变它,希望可以得到前辈们的指点,谢谢!

lainnetwork changed fields 3 years ago
Name Previous Value Current Value
Type
Bug
Support Request
lainnetwork commented 3 years ago

Hello, I started onedev with docker, version 4.0.9. I want to add the JVM parameter when onedev starts to limit its maximum memory and control the proportion of its memory in the total memory of the server.

I tried to read the entrypoint.sh But we found that wrapper-linux-x86-64 was executed in the end, and then I found this in configFile /APP/conf/wrapper.conf

wrapper.java.maxmemory .percent=60

It seems that the default maximum value is 60% of the physical memory, but I don't know much about this startup mode, and I don't know how to change it when starting the image. I hope I can get some instructions, thank you!

lainnetwork commented 3 years ago

已经找到解决方法了,原来那个wrapper.conf就在映射出来的文件目录里面,直接改了重启就好了。。。😑

lainnetwork changed fields 3 years ago
Name Previous Value Current Value
Priority
Normal
Minor
Robin Shen changed state to 'Closed' 3 years ago
Previous Value Current Value
Open
Closed
Robin Shen commented 3 years ago

嗯,直接修改这个文件可以的。

issue 1 of 1
Type
Question
Priority
Minor
Assignee
Issue Votes (0)
Watchers (3)
Reference
onedev/server#271
Please wait...
Page is in error, reload to recover