tomcat报错:
[2015-08-24 14:56:41] 3084386 ERROR - com.tools.common.util.close.CloseUtil - Unable to close [email protected]
org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.
at org.apache.coyote.http11.AbstractOutputBuffer.checkLengthBeforeWrite(AbstractOutputBuffer.java:547)
at org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:511)
at org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:428)
at org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:394)
at org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:1540)
at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:773)
at org.apache.coyote.Response.action(Response.java:174)
at org.apache.coyote.Response.sendHeaders(Response.java:365)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:352)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:309)
at org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:112)
at com.tools.common.util.close.CloseUtil.close(CloseUtil.java:20)
at com.tools.common.struts.base.BaseAction.print(BaseAction.java:63)
at com.tools.common.struts.base.BaseAction.print(BaseAction.java:43)
at com.jlj.sso.web.login.LoginAction.login(LoginAction.java:47)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
经网络查询,发现是tomcat的请求的头过大,解决办法如下:
maxHttpHeaderSize="102400"次参数不要设置过大,容易导致内存溢出。
设置位置为访问端口