我们在 tomcat 上部署了一个 GWT 应用程序,使用几个小时后(2 个 QA 执行一般测试),java 进程开始使用所有 CPU 并且应用程序变慢。
我查看了 tomcat 管理器,发现有许多长时间运行的 HTTP 请求,它们都指向“/gwtRequest”,这是我们的 RequestFactory servlet。
之后我进行了线程转储,发现转储中的所有 RUNNABLE http 线程都指向“AutoBeanCodexImpl.doCoderFor()”
"http-8080-51" daemon prio=10 tid=0x00007f23d8b81800 nid=0x4981 runnable [0x00007f23d4285000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl.doCoderFor(AutoBeanCodexImpl.java:519) at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:276) at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253) at com.google.web.bindery.autobean.vm.impl.BeanPropertyContext.set(BeanPropertyContext.java:44) at com.google.web.bindery.requestfactory.server.Resolver$PropertyResolver.visitValueProperty(Resolver.java:155) at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289) at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166) at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101) at com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:414) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:493) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:235) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:137) at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
有人可以指出我应该看的地方吗?谢谢