tomcat的backgroundProcess在处理session时出现堆内存溢出问题

org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren
严重: Exception invoking periodic operation:
java.lang.OutOfMemoryError: Java heap space
at java.lang.reflect.Array.newArray(Native Method)
at java.lang.reflect.Array.newInstance(Array.java:52)
at java.util.Arrays.copyOf(Arrays.java:2760)
at java.util.Arrays.copyOf(Arrays.java:2734)
at java.util.AbstractCollection.finishToArray(AbstractCollection.java:198)
at java.util.AbstractCollection.toArray(AbstractCollection.java:173)
at org.apache.catalina.session.ManagerBase.findSessions(ManagerBase.java:873)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:676)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:662)

1个回答

首先检查程序是否有有问题,其次根据jvisualvm工具查看对内存主要损耗和设置的最大值是否与场景不相符

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐