Chuck,

Thank you for responding to my query.  I'd be more than happy to fix our
webapp if I understood what it was doing wrong, but unfortunately I don't
understand your answer.  Would you please give me an example of how I would
purposefully write a webapp to create the behavior I witnessed?  I do not
know of any way to get Tomcat to generate two separate response log lines
from two separate threads while reporting the timestamps and processing
time as I described.

The closest I can come up with is if I wrote a ServletFilter that saved a
request and later hijacked some other request thread, replacing that
incoming request with the saved request, but then the response would go to
the requester whose thread had been hijacked, which is not what we observe.
 We observe the user getting the second generated response (the one logged
first in the Tomcat log).  Also in that case the mod_jk log would show two
requests, not one.

If you can show me how I can intentionally generate the kind of results we
are seeing then I will have a clue as to what to look for to fix in the
app.  As it is now, my understanding is that it is fundamental to Tomcat's
architecture that one request is handled exclusively in one thread and what
the logs are showing is a violation of that contract. Which is why I think
it is a Tomcat (or Apache or mod_jk or AJP) bug.

=Jeremy=


On Wed, Nov 16, 2011 at 10:25 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Jeremy [mailto:asfbugzi...@nuru.net]
> > Subject: Single POST request being handled twice
>
> > How is it possible that Tomcat has 2 threads handling
> > the same request?
>
> This is usually the result of an application coding or design error:
> storing a reference to a request in an inappropriate scope such as the
> session or a servlet instance or static field.
>
> > How can we detect this as opposed to the user legitimately
> > sending the same request twice?
>
> A) Fix your webapp.
> [snip]

Reply via email to