response header less的問題,請求頭超過了8K
昨天晚上加班到快十點的時候,系統突然出現了一個問題:
SEVERE: Servlet.service() for servlet [springmvc] in context with path [/nestle] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: 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.] with root cause
java.lang.IllegalStateException: 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.
由於這兩天被壓力測試搞得一團亂麻,看到報錯了後壓根沒心情解決,關上電腦立馬閃人了。
早上來了還是得繼續解決。
折騰了一上午都不知道啥原因,看到有說要修改maxHttpHeaderSize的大小,看了下tomcat的官方文件,預設的大小是8k,修改了後,是不報錯了,但是登陸之後一直請求不到資源,瀏覽器除錯報錯如下:
Failed to load resource
ERR_CONTENT_LENGTH_MISMATCH 但是重新整理一下頁面之後就能載入成功了。 還以為是什麼代理的問題,把shadowsocks和谷歌的proxy都解除安裝了,還是沒用讓同事試了下登陸他們都說是好的,後來我靈機一動換了個別的賬號登陸試了下,發現ok的,完全沒有問題。