Linux下修改JVM内存大小:
要添加在tomcat 的bin 下catalina.sh 里,位置cygwin=false前 。注意引号要带上,红色的为新添加的.
# OS specific support. $var _must_ be set to either true or false.
JAVA_OPTS="-Xms256m -Xmx512m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m"
JAVA_OPTS="-Xms500m -Xmx3200m -Xss1024K -XX:PermSize=64m -XX:MaxPermSize=500m"
报错:
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000743100000, 524288, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 524288 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/local/apache-tomcat-8.5.23/bin/hs_err_pid32228.log
参考:https://blog.csdn.net/rickyit/article/details/53895060