JVM突然崩溃的原因 [英] Reason for sudden JVM crash

查看:246
本文介绍了JVM突然崩溃的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我有一个在tomcat上运行的Spring Boot应用程序,并且在过去的几个月中运行得很好.就在上周,我添加了一个功能更新,其中我解析了一个很大的csv文件(大约90 mb),并将csv数据存储在几个HashMaps中.加载JVM大约需要20秒左右的时间,而JVM中大约需要600 mb的空间. 解析和加载是在启动时进行的,即恰好在部署Spring Boot应用程序时进行. 问题是,自从我向应用程序添加功能以来,JVM偶尔崩溃.该应用程序可以正常运行几个小时,然后崩溃.否则JVM会在应用程序部署后立即崩溃,一天至少发生3-4次,因此我们正遭受宕机的困扰. 另外,我似乎在tomcat日志中找不到任何内容. 如果有人可以指出我的方向来调试该死的崩溃,我将不胜感激. 谢谢.

Background : I have a Spring Boot app running on tomcat,and it was running just fine for the past couple of months. Just last week,I added a feature update , wherein I am parsing a considerably large csv file(about 90 mb) ,and storing the csv data in a couple of HashMaps. It takes about 20 sec or so to parse and about 600 mb of space in the JVM once it is loaded. This parsing and loading happens on startup, i.e exactly when the Spring Boot app is deployed. Problem is,ever since I've added feature into my app,the JVM crashes sporadically. The app runs fine for a few hours,then crashes. Or the JVM crashes as soon as the app is deployed.This happens atleast 3-4 times in a day , and we are suffering downtime because of it. Also,I can't seem to find anything in tomcat logs. I would appreciate if anyone can point me out in a direction to debug this damn crash. Thank you.

推荐答案

我建议将jProfile附加到您的jvm并分析内存使用情况.或者只是执行"kill -3 pid"以在特定间隔内生成堆转储文件这些文件可以帮助您诊断内存占用问题.

I suggest to attach jProfile to your jvm and analyze the memory usage.Or just execute "kill -3 pid" to generate a heap dump file on a particular interval.The files may help you diagnose memory footprint problems.

这篇关于JVM突然崩溃的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆