刚接手一项目,weblogic部署环境,发现weblogic每隔几个小时就shutdown一次,经过跟踪发现既不是内存问题,也不是数据库连接池问题,更不是访问量过大引起。
查询相关日志,只有以下几句shutdown的日志:
<BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
<BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
<BEA-000365> <Server state changed to FORCE_SUSPENDING>
从上面的日志看来,更像是人为关闭weblogic产生的日志,一时间感觉没有头绪。经过半年多的查询各种相关资料,把问题范围锁定到jdk的相关问题。看到某文章上有一段话,大概是这样:When WebLogic Server running with the Sun JVM is shutdown, it is because there is a unwanted operating system call terminating the process.意思是说:当你的weblogic使用sun jvm时出现shutdown现象,是系统的一个不必要的操作,导致要关闭这个进程。而我的weblogic刚好使用的是sun jvm。
该问题解决方案如下:
确认你的weblogic使用的jdk是sun