Weblogic异常解决方案
-----by alexluo 新浪微博:四夕alex
Question1,
内存溢出报错,OufOfMemoryErrors eventually.
问题原因:Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause OufOfMemoryErrors eventually. 由于SUN JVM对permanent heap generation 区域的内容不做垃圾回收造成应用动态Load class文件过多引起的OutOfMemory错误。频繁deploy会导致weblogic报permGen 错误。
修改文件:setDomainEnv.sh
文件路径:
解决方案:(修改-XX:MaxPermSize由原来的128M调整为256M或512M)
MEM_PERM_SIZE="-XX:PermSize=48m"
export MEM_PERM_SIZE
MEM_MAX_PERM_SIZE="-XX:MaxPermSize=512m"
export MEM_MAX_PERM_SIZE
修改后如图:
重启./startweblogic.sh
Question2,
打开过多文件错误,too many file opens
问题原因: linux系统对用户打开太多文件的数量有限制,可以通过ulimit –a 查看到open files (-n) 1024。
修改文件:/etc/security/limits.conf,commEnv.sh(weblogic的公用环境设置文件)
修改内容:将文件中打开文件数限制从原来的1024调整为更大。我修改为65535.
文件中增加下面内容:
Step1,
文件路径
修改增加如下几行如图:
Step2
修改脚本
文件位置:
修改脚本如下:
重启./startweblogic即可。
待续。。遇到问题持续更新ING。。
转载于:https://blog.51cto.com/alexluo/1052349