Topic
1 reply Latest Post - ‏2014-04-13T06:21:24Z by wasibx
SystemAdmin
SystemAdmin
237 Posts
ACCEPTED ANSWER

Pinned topic Caused by: java.lang.IllegalArgumentException: Too many headers in storage:

‏2012-04-16T06:47:26Z |
Hello

We have IBM WebSphere 7 Fix Pack 12. Recently, our logs contains the following stack trace.

Caused by: java.lang.IllegalArgumentException: Too many headers in storage: 4136
at com.ibm.ws.genericbnf.impl.BNFHeadersImpl.incrementHeaderCounter(BNFHeadersImpl.java:3588)
at com.ibm.ws.genericbnf.impl.BNFHeadersImpl.addHeader(BNFHeadersImpl.java:3008)
at com.ibm.ws.genericbnf.impl.BNFHeadersImpl.appendHeader(BNFHeadersImpl.java:408)
at com.ibm.ws.webcontainer.channel.WCCResponseImpl.addHeader(WCCResponseImpl.java:208)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.addField(SRTServletResponse.java:331)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.addHeader(SRTServletResponse.java:1959)
at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:181)
at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:181)
at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.addHeader(PageResponseWrapper.java:137

Do we have to increase header numbers or header size? If so, where is the configuration place that we can configure?

Thanks and regards.

Gurkan
  • wasibx
    wasibx
    1 Post
    ACCEPTED ANSWER

    Re: Caused by: java.lang.IllegalArgumentException: Too many headers in storage:

    ‏2014-04-13T06:21:24Z  in response to SystemAdmin

    Hi, You have more than 32768 bytes of HTTP Headers in your response?  That is quite unusual and most likely not your cause.  However, if you are using the IBM HTTP Server you need to add the following property to the httpd.conf: LimitRequestFieldSize #####, where ##### is the size of headers you want.  The default is 8190 on the HTTP Server.  For WebSphere, you can edit this by going to Application servers > SERVER_NAME > Web container transport chains > WCInboundDefault > HTTP inbound channel (HTTP_#).  There are two fields Maximum Header Size and Maximum Headers that can be changed.  Changing these requires a restart.