java应用服务器实例突然关闭的可能原因
鉴于我是开发人员,应用程序服务器的知识仅限于基础知识,例如部署、声明/映射资源。
我的第一步是调查应用程序和服务器日志(sysout 和 syserr)以查找任何线索并查看服务器实例在关闭之前执行的最后一件事。例如,对于本地部署的 Tomcat,如果它突然关闭(可能是由于内存问题),您将看到与 PermGen 相关的堆栈跟踪。
我的问题是,如果在关闭之前没有任何迹象表明日志中出现问题,我该怎么办?我还应该检查哪些其他地方?突然关闭的可能原因是什么?
就我而言,这是一个 WAS 6.1,其中有多个实例,但只有 1 个实例死亡。这个死亡实例有多个应用程序,但不超过 5 个。
Given that I'm developer and knowledge of app servers is scoped to the basics such as deploying, declaring / mapping resources.
My first step is to investigate the app and server logs (sysout and syserr) to find any clues and see the last thing the server instance did before the shutdown. For example with a locally deployed Tomcat, if it suddenly shutsdown perhaps due to memory issue, you would see a stack trace related to PermGen.
My question is, if there isn't any indication that something went wrong in the logs before the shutdown, where do I go from there? What other places should I look into, and what would be the possible causes of this sudden shutdown?
In my case, this is a WAS 6.1 where there are several instances, where only 1 instance died. This instance that died has several apps, not more than 5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议下载 Visual VM 1.3.2,安装全部可用的插件,并在重新启动 Java EE 服务器后附加到 JVM 进程。它会让您看到所有线程、堆的所有代、类的内存使用情况等。如果您可以重现导致关闭的场景,Visual VM 1.3.2 将为您提供更多的可视性和洞察力。
I'd recommend downloading Visual VM 1.3.2, installing all the available plug-ins, and attaching to the JVM process after restarting your Java EE server. It'll let you see all the threads, all the generations of the heap, memory usage by class, etc. If you can reproduce the scenario that caused the shutdown, Visual VM 1.3.2 will give you a lot more visibility and insight.