Re: Tomcat occasionally duplicating responses

2015-06-14 Thread Mark Thomas
On 14/06/2015 15:56, evernat wrote: >> On Mon, May 18, 2015 at 12:30 PM, Mark Thomas apache.org> wrote: > >> Once a request/response has been put into async mode, control passes to >> the async processing. i.e. from that point onwards the container should >> not be writing to the response until t

Re: Tomcat occasionally duplicating responses

2015-06-14 Thread evernat
> On Mon, May 18, 2015 at 12:30 PM, Mark Thomas apache.org> wrote: > Once a request/response has been put into async mode, control passes to > the async processing. i.e. from that point onwards the container should > not be writing to the response until the application returns control to > the co

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 2:24 PM, Mark Thomas wrote: > On 18/05/2015 13:40, Stephen Dawkins wrote: >> On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: > > Bingo. > > I think I have found the problem (well, a problem anyway). It looks like > there is a bug in javamelody. > > Once a request/resp

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 13:40, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: >> Thanks. That rules out some possibilities for application error. >> >> When you get two threads writing to the response, if would be useful to >> know which of the following those threads are: >>

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: > Thanks. That rules out some possibilities for application error. > > When you get two threads writing to the response, if would be useful to > know which of the following those threads are: > - the Tomcat thread that handled the original reque

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 12:07, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 12:00 PM, Mark Thomas wrote: >> 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 th

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 12:00 PM, Mark Thomas wrote: > On 18/05/2015 11:50, Stephen Dawkins wrote: >> On Mon, May 18, 2015 at 11:22 AM, Mark Thomas wrote: >>> On 18/05/2015 10:31, Stephen Dawkins wrote: Does anyone have any suggestions as to where the issue could be? >>> >>> Are you using an

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 11:50, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 11:22 AM, Mark Thomas 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

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 11:22 AM, Mark Thomas 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

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 10:31, Stephen Dawkins wrote: > Hi > > I have an application that uses embedded Tomcat (8.0.22) to serve SOAP > services. I've recently attempted to add javamelody[1] to the app to gather > some stats, however I've run into an issue where occasionally the response > is incorrect, mos

Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
Hi I have an application that uses embedded Tomcat (8.0.22) to serve SOAP services. I've recently attempted to add javamelody[1] to the app to gather some stats, however I've run into an issue where occasionally the response is incorrect, mostly it just duplicates response, although sometimes it's