High CPU due to threads looping in OutputBuffer.realWriteChars

Nie Fei <[email protected]> Tue, 19 Apr 2016 19:34:23 +0800
Newsgroups gmane.comp.java.jboss.user
Message-ID <CAO_b4twYs6jttYdBDXf9BFEMSK+chB5i-r_waOgtFc3Ab0t5PA@mail.gmail.com>
--===============1536191659972097143==
Content-Type: multipart/alternative; boundary=089e013c6648d7d1f90530d4db60

--089e013c6648d7d1f90530d4db60
Content-Type: text/plain; charset=UTF-8

Hi all,

We're seeing JBoss consumes high CPU and the thread dumps and CPU data
indicates that the high consuming threads are always in some point of the
OutputBuffer.realWriteChars method and its underlying char to byte
conversions and buffer flushes, for example

"ajp-127.0.0.1-8009-1" daemon prio=10 tid=0x00002aabd4fb2000 nid=0x7a6
runnable [0x00002b24a1517000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.cs.ISO_8859_1$Encoder.encodeArrayLoop(ISO_8859_1.java:148)
        at sun.nio.cs.ISO_8859_1$Encoder.encodeLoop(ISO_8859_1.java:187)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
        at org.apache.tomcat.util.buf.C2BConverter.convert(C2BConverter.java:91)
        at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:465)
        at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:440)
        at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:295)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:499)
        at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:143)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119)
        at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326)


Does anybody know how to fix it?

In fact, there is an article which describes the same situation I have. But
I have no enough privileges to read the full content.

Can you help me ?

https://access.redhat.com/solutions/129963

thanks,
br,
/nf

--089e013c6648d7d1f90530d4db60
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><span style=3D"color:rgb(51,51,51);fon=
t-family:Overpass,&quot;Open Sans&quot;,Helvetica,sans-serif;font-size:16px=
;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:no=
rmal;line-height:22.576px;text-align:left;text-indent:0px;text-transform:no=
ne;white-space:normal;word-spacing:0px;display:inline!important;float:none;=
background-color:rgb(255,255,255)">Hi all,<br><br>We&#39;re seeing JBoss co=
nsumes high CPU and the thread dumps and CPU data indicates that the high c=
onsuming threads are always in some point of the OutputBuffer.realWriteChar=
s method and its underlying char to byte conversions and buffer flushes, fo=
r example<br><br></span><pre style=3D"overflow:auto;font-family:Consolas,Mo=
naco,&quot;Andale Mono&quot;,monospace;font-size:13px;display:block;padding=
:0.9375rem;margin:0px 0px 10px;line-height:1.42857;word-wrap:normal;color:r=
gb(51,51,51);border:1px solid rgb(236,236,236);border-radius:0px;white-spac=
e:pre-wrap;font-style:normal;font-variant:normal;font-weight:normal;letter-=
spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spa=
cing:0px;background-color:rgb(245,245,245)"><code style=3D"font-family:Cons=
olas,Monaco,&quot;Andale Mono&quot;,monospace;font-size:inherit;padding:0px=
;color:inherit;white-space:pre-wrap;border-radius:0px;background-color:tran=
sparent">&quot;ajp-127.0.0.1-8009-1&quot; daemon prio=3D10 tid=3D0x00002aab=
d4fb2000 nid=3D0x7a6 runnable [0x00002b24a1517000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.cs.ISO_8859_1$Encoder.encodeArrayLoop(ISO_8859_1.java:14=
8)
        at sun.nio.cs.ISO_8859_1$Encoder.encodeLoop(ISO_8859_1.java:187)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
        at org.apache.tomcat.util.buf.C2BConverter.convert(C2BConverter.jav=
a:91)
        at org.apache.catalina.connector.OutputBuffer.realWriteChars(Output=
Buffer.java:465)
        at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:=
440)
        at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:295)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.ja=
va:499)
        at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.ja=
va:143)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImp=
l.java:119)
        at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java=
:326)</code></pre><br></div>Does anybody know how to fix it?<br><br></div><=
div>In fact, there is an article which describes the same situation I have.=
 But I have no enough privileges to read the full content. <br></div><div><=
br></div><div>Can you help me ?<br><br><a href=3D"https://access.redhat.com=
/solutions/129963">https://access.redhat.com/solutions/129963</a><br><br></=
div>thanks,<br></div>br,<br></div>/nf<br></div>

--089e013c6648d7d1f90530d4db60--

--===============1536191659972097143==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
--===============1536191659972097143==--