Tomcat Server 9 - 一段时间后挂起

Tomcat Server 9 - 一段时间后挂起

我最近将我的应用程序服务器从 tomcat 6 升级到了 tomcat 9。升级后,我们将其中一个应用程序迁移到了新服务器,通过升级所有库来迁移到新的 JAVA 版本。

在应用程序中,我们使用 Spring Security 并配置了几个用于身份验证和授权的过滤器。

一旦我们将软件包部署到此服务器上,应用程序就会运行一段时间,可能几个小时,但性能会在一段时间内下降。当性能显著下降时,我们在服务器上的线程转储中会出现以下内容

在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)位于 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)位于 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)位于 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)位于 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)位于 org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)位于org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.authentication.logout.LogoutFilter 上。doFilter(LogoutFilter.java:116)位于 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)位于 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)位于 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)位于 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)位于 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)位于 org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)位于org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 在 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 在 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185)在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) 在 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 在 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185)在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) 在 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 在 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)位于 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:530) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:624) at org.apache.jsp.error_jsp._jspService(error_jsp.java:531) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)位于 javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

我们看到的是这一段代码重复了至少 25 次并且线程显示为可运行。

您能指导我应重点关注哪里来寻找问题吗?

提前致谢

相关内容