讨论区 » AAS-V9企业版 » AAS-V9企业版补丁插件专区 »
AASv9性能补丁2021-11-19
问题发现:
有问题的构建版本号:sp6 202104121818
AASv9在运行时,工作线程cpu占用一直处于100%,并且不会恢复,当工作线程到达最大线程数后,应用无法访问。通过对比测试,2020年8月份的apusic.jar未发现此问题。
经分析发现是jsp存在自定义标签,会有多次写操作,每次写后会中断http连接。由于写操作中存在逻辑错误,造成HttpWriter无限循环写,造成cpu100%。
jstack打印堆栈,工作线程的堆栈显示如下。
"HTTPHandler-47-137" #137 prio=5 os_prio=0 tid=0x0000fffd4c034000 nid=0x1fa3 runnable [0x0000fffbfb1fd000]
java.lang.Thread.State: RUNNABLE
at sun.nio.cs.ext.DoubleByte$Encoder.encodeLoop(DoubleByte.java:617)
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:579)
at com.apusic.web.http.HttpWriter$StreamWriter.implWrite(HttpWriter.java:516)
at com.apusic.web.http.HttpWriter.write(HttpWriter.java:206)
at java.io.PrintWriter.write(PrintWriter.java:426)
- locked <0x000000040fd14e10> (a com.apusic.web.http.HttpWriter$StreamWriter)
at com.apusic.web.jsp.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:110)
at com.apusic.web.jsp.runtime.JspWriterImpl.release(JspWriterImpl.java:260)
at com.apusic.web.jsp.runtime.PageContextImpl.release(PageContextImpl.java:100)
at com.apusic.web.jsp.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:42)
at _jspx._riseoffice._default._NewInstance__jsp._jspService(_NewInstance__jsp.java:119)
at com.apusic.web.jsp.runtime.HttpJspPageImpl.service(HttpJspPageImpl.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at com.apusic.web.container.ServletComponent.service(ServletComponent.java:87)
at com.apusic.web.container.WebContainer.invoke(WebContainer.java:1171)
at com.apusic.web.container.WebContainer.invoke(WebContainer.java:1039)
at com.apusic.web.jsp.JspServlet.service(JspServlet.java:338)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at com.apusic.web.container.ServletComponent.service(ServletComponent.java:87)
at com.apusic.web.container.WebContainer.invoke(WebContainer.java:1171)
at com.apusic.web.container.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:106)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
解决方案:通过补丁解决,堆栈详情和补丁见附件,将补丁包更新至 sp目录。
11.txt (280 KB) 11.txt | |||
cpu1983.jar (9.2 KB) cpu1983.jar |