High CPU due to threads looping in OutputBuffer.realWriteChars

Solution Verified - Updated -

Issue

  • 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)
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 5.x
  • Red Hat JBoss Enterprise Portal Platform (EPP) 5.x
  • Red Hat JBoss Enterprise SOA Platform (SOA-P) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content