resin3.1.8在从jdk1.6升级到jdk1.8后的配置改动

阅读更多
一直还在用resin3.1系列。
最新项目升级,需要升级jdk从1.6到jdk1.8.升级后的resin需要做必要的配置更新。

为了确保万一我对resin做了重新编译(操作前的备份是必要的):
进入到resin安装包目录

./configure --prefix=/usr/local/resin
make
make install

然后将之前的resin中的resin.conf resin-82.conf配置比较了一下没有什么特殊变化,拷贝回来到新的resin/conf下。

将mysql-connector-java-5.1.17-bin.jar拷贝到resin/lib下

service resin start 发现还用的jdk1.6 java启动,需要修改:

vi /etc/init.d/resin
将其中:
JAVA_HOME=/usr/java/jdk1.8 (原来为jdk1.6的目录)

然后可以用新版jdk1.8启动了。
但是启动报错, jvm-default.log日志显示:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=64M; support was removed in 8.0
MaxTenuringThreshold of 20 is invalid; must be between 0 and 15

将之前的resin.conf 中对jvm的优化参数中的PermSize=64M 去掉,MaxTenuringThreshold=20 改为 MaxTenuringThreshold=15

然后启动,ok。

附录:
resin3.1 在jdk1.6下的jvm优化参数:

     
      -Xmx1024m
      -Xms1024m
      -Xss1m
      -Xmn100M                                                                                     
      -XX:PermSize=64M                                                                             
      -XX:SurvivorRatio=8                                                                           
      -XX:MaxTenuringThreshold=20                                                                   
      -XX:+UseParNewGC                                                                              
      -XX:+UseConcMarkSweepGC                                                                       
      -XX:+UseCMSCompactAtFullCollection                                                            
      -XX:CMSFullGCsBeforeCompaction=1                                                             
      -XX:-CMSParallelRemarkEnabled                                                                 
      -XX:CMSInitiatingOccupancyFraction=50                                                         
      -Xloggc:/data/logs/resin/gc_resin_88.log 
     
      -XX:-UseGCOverheadLimit
     
      -Djava.awt.headless=true
      -J-server
     
      -Xdebug
      -Dcom.sun.management.jmxremote


resin3.1 在jdk1.8下的jvm优化参数:

      -Xmx1024m
      -Xms1024m
      -Xss1m
      -Xmn100M
      -XX:SurvivorRatio=8
      -XX:MaxTenuringThreshold=15
      -XX:+UseParNewGC
      -XX:+UseConcMarkSweepGC
      -XX:+UseCMSCompactAtFullCollection
      -XX:CMSFullGCsBeforeCompaction=1
      -XX:-CMSParallelRemarkEnabled
      -XX:CMSInitiatingOccupancyFraction=50
      -Xloggc:/data/logs/resin/gc_resin_88.log

      -XX:-UseGCOverheadLimit

      -Djava.awt.headless=true
      -J-server

      -Xdebug
      -Dcom.sun.management.jmxremote

当然这里需要根据自身情况适当调整。

你可能感兴趣的:(resin,jdk,jvm)