On 18/05/2015 11:50, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 11:22 AM, Mark Thomas <ma...@apache.org> wrote: >> On 18/05/2015 10:31, Stephen Dawkins wrote: >> >> Tomcat will call flushBuffer() internally. >> >> Tomcat does re-use Request/Response objects so if a reference is >> accidentally retained to one of them you can see this issue. >> >> Try using: >> org.apache.catalina.connector.RECYCLE_FACADES=true >> >> (not the best named attribute but true will cause a new facade to be >> created for every request/response). > > I will test with that property set. > >> Are those both Java threads from the same JVM? > Yes, they're both from the same JVM. > >> >> Can you correlate seeing multiple threads with the error occurring? >> > Most of the time, a response is written by just one thread. > Occasionally the last 0\r\n\r\n is written by a different thread to > the one that writes the bulk of the response. > >> >> Unlikely but possible to be a Tomcat issue with the information we have >> so far. >> >>> Does anyone have any suggestions as to where the issue could be? >> >> Are you using any Servlet 3.0 async features? >> > Yes, I have async enabled for the filter and the servlet that > processes the request, and the application will likely use a different > thread to response than processes the request.
OK. Is Javamelody async aware? In particular I am wondering if it correctly handles the case where Servlet.service() returns after startAsync() but the app hasn't written any of / all of the response yet. If javamelody is wrapping the response it is going to need to handle the async case correctly. Mark > >> Mark >> >>> >>> [1] https://code.google.com/p/javamelody/ >>> >>> Thanks & Regards >>> Stephen >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org