我有一个tomcat 8实例只在Windows机器上运行我的泽西网络服务应用程序。经过一段时间(可能是几小时或几天),tomcat只会崩溃,留下以下日志:
看起来错误发生在Web服务中,因为我可以在堆栈跟踪中看到org.glassfish.jersey
。
但我不确切地知道为什么会发生这种情况。也许我的一些服务正在吃很多记忆,但我不知道哪一个。
有没有办法运行一些诊断来准确检测这个错误的原因是什么?
11-Apr-2015 10:27:09.154 INFO [http-apr-8080-exec-3] org.glassfish.jersey.server.ApplicationHandler.initialize Initiating Jersey application, version Jersey: 2.0 2013-05-14 20:07:34...
11-Apr-2015 19:20:59.447 WARNING [http-apr-8080-exec-5] null.null Attempt to release single request processing resources has failed.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.LinkedHashMap$LinkedKeySet.iterator(LinkedHashMap.java:539)
at java.util.HashSet.iterator(HashSet.java:172)
at org.glassfish.hk2.utilities.DescriptorImpl.hashCode(DescriptorImpl.java:481)
at org.jvnet.hk2.internal.SystemDescriptor.hashCode(SystemDescriptor.java:729)
at java.util.HashMap.hash(HashMap.java:338)
at java.util.HashMap.get(HashMap.java:556)
at org.glassfish.jersey.process.internal.RequestScope$Instance.put(RequestScope.java:491)
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:579)
at org.jvnet.hk2.internal.IterableProviderImpl.get(IterableProviderImpl.java:87)
at org.glassfish.jersey.server.ServerRuntime$Responder.release(ServerRuntime.java:539)
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:324)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:227)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:323)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
11-Apr-2015 19:22:09.935 SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run Unexpected death of background thread ContainerBackgroundProcessor[StandardEngine[Catalina]]
java.lang.OutOfMemoryError: GC overhead limit exceeded