On 06/02/2019 17:27, Giuseppe Sacco wrote: > Hello, > I have a tomcat 8.5.20 installation that handle many applications. When > calling one of the URLs of a specific application, sometimes I get > a 500 http error. Please note that this it does not happens always. > > The connector uses SSL, so I setup wireshark and decrypted the traffic. > Finally I found this: an SSL stream that displays the response before > the request, i.e., this is what is shown as decrypted: > *********************************************************************** > HTTP/1.1 500 > Content-Type: text/plain > Content-Length: 57 > Date: Wed, 06 Feb 2019 15:23:46 GMT > Connection: close > > The call failed on the server; see server log for detailsPOST > /lnuiprod/gwtui/persist HTTP/1.1 > Host: srclnprod.mydomain.tld:8445 > Connection: keep-alive > Content-Length: 18118 > X-GWT-Module-Base: https://srclnprod.mydomain.tld:8445/lnuiprod/gwtui > X-GWT-Permutation: 8E....921 > Origin: https://srclnprod.mydomain.tld:8445 > User-Agent: Mozilla/.....36 > Content-Type: text/x-gwt-rpc; charset=UTF-8 > Accept: */* > Referer: https://srclnprod.mydomain.tld:8445/lnui/servlet/login > Accept-Encoding: gzip, deflate, br > Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7 > Cookie: JSESSIONID=B.....2F£ > > 7|1|14|http....... (body continues until the end of the stream) > *********************************************************************** > > I see the request in the valve log. I see an exception in the tomcat > log from a servlet that complains about an unparseable request. > > The servlet that logs the message is not the one associated to the URL. > I am not even sure it is from the same context. > > So, I wonder, what instructs tomcat to start parsing a request? Is it > the newline inbetween the header and the body? How is it possible to > explain this behaviour?
A 500 response will result in the connection being closed. It sounds like something in an application is holding on to a reference to the request and/or the response for longer than it should. These objects are recycled and re-used so retaining references to them will cause problems. One of the first things to try is: -Dorg.apache.catalina.connector.RECYCLE_FACADES=true See https://tomcat.apache.org/tomcat-9.0-doc/config/systemprops.html#Security Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org