tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Petit <lpe...@yseop.com>
Subject Re: Re : Re: Issue with keep-alive connections, when using APR Connector on Windows and starting Processes from Servlets
Date Mon, 25 Jun 2012 11:46:55 GMT
On Mon, 2012-06-25 at 11:51 +0200, Jeff MAURY wrote:

> If you can post a Mavenized example, I could have time to run it and watch
> at it.


Ok, thanks, I will.

Is a mavenized project with source code published on github ok for you ?


> 
> Regards
> Jeff
> 
> 
> On Mon, Jun 25, 2012 at 11:40 AM, Laurent Petit <lpetit@yseop.com> wrote:
> 
> > Hello,
> >
> > Is there anything I can do to help qualify the problem even more ?
> >
> > Beyond having shown the source code of the servlet, would a fully
> > mavenized example help? Anything else?
> >
> > Regards,
> >
> > --
> > Laurent
> >
> >
> > On Fri, 2012-06-22 at 10:21 +0200, Laurent Petit wrote:
> > > Hello,
> > >
> > > On Thu, 2012-06-21 at 22:53 +0200, Jeff MAURY wrote:
> > > > Is it specific to Wordpad or any launched process will do the trick ?
> > > > Do you tried with a non UI process (console) ?
> > >
> > >
> > > I did an additional test, as you suggested, with a non UI process (a
> > > small java executable launched in headless mode, whose purpose was just
> > > to wait for 20 seconds before exiting).
> > >
> > > I can reproduce the problem with this headless executable: the HTTP
> > > client is blocked until the 20 seconds elapse and the process is killed.
> > >
> > >
> > > Here is the modified servlet code I used:
> > >
> > > https://www.refheap.com/paste/3285
> > >
> > >
> > > and here is the code for the small java program:
> > >
> > > https://www.refheap.com/paste/3286
> > >
> > >
> > >
> > > Regards,
> > >
> > > --
> > > Laurent
> > >
> > >
> > >
> > > >
> > > > Jeff
> > > >
> > > > On Thu, Jun 21, 2012 at 10:45 PM, Laurent Petit <lpetit@yseop.com>
> > wrote:
> > > >
> > > > > En Réponse à "Tomcat Users List" <users@tomcat.apache.org>
le 21
> > juin
> > > > > 2012 00:07 Can you verify your 2 threads (reading input an error)
are
> > > > > launched ? Yes they are. Verified. Can you confirm you are getting
> > the
> > > > > problem only on Windows ? Yes sir, we're unable to reproduce it on
> > Ubuntu.
> > > > > Jeff On Wed, Jun 20, 2012 at 4:19 PM, Laurent Petit <
> > lpetit@yseop.com>
> > > > > wrote: > Hello, > > I have a problem with keep-alive connections,
> > when
> > > > > starting a subprocess > (via JDK's default ProcessBuilder/Process
> > API),
> > > > > while also having > started Tomcat with the APR HTTP/1.1 Connector.
> > > > The
> > > > > problem symptom is with Keep-Alive connection, as follows: > >
- the
> > client
> > > > > (browser, jmeter, etc.) sends a first request > - the servlet
starts
> > a
> > > > > Process for e.g. wordpad.exe > - the servlet returns an
> > acknowledgment html
> > > > > content, sets the content > length, flushes the writer, and returns
> > > - the
> > > > > client displays the received acknowledgement html content, sends
>
> > the
> > > > > second request to the server. > - the server doesn't answer. No
> > Tomcat log
> > > > > ever reports the start of > something received. > - Then when
on the
> > server
> > > > > you close the wordpad.exe instance, the server > finally handles
the
> > second
> > > > > request. > > I have created a small servlet code which reproduces
the
> > > > > problem. > For the demo, it suffices to have the started subprocess
> > be >
> > > > > "wordpad.exe". Of course my real process is more interesting than
>
> > that
> > > > > :-). > > You can find the servlet code for reproducing the
test
> > here: > >
> > > > > https://www.refheap.com/paste/3254 > > > To reproduce the
problem
> > > > > deterministically, the ConnectionTimeout for > the APR HTTP
> > Connector in
> > > > > servlet.xml must be set sufficiently low. > With my boxes, I get
a
> > 100%
> > > > > error hit when set at 200 ms. > > You can find here the jmeter
> > script which
> > > > > hits the same page again and > again with "keep-alive" option
set
> > on: > >
> > > > > https://www.refheap.com/paste/3255 > > > So far, the only
reliable
> > > > > solution we have found to work around this > problem is to not
use
> > the
> > > > > HTP/1.1 APR Connector. > > > My configuration : > Windows
2008 US
> > std R2
> > > > > 64bits > Tomcat 6.0.32 64 bits > Java 6u30 64 bits(Oracle)
> > Same
> > issue
> > > > > has been observed on Windows 7 32 bits. > > Was not able to
> > reproduce the
> > > > > issue on Linux Ubuntu Desktop 11.10 or > 12.04. > > >
Thanks for your
> > > > > support, ideas, solutions, etc. > > > >
> > > > >
> > --------------------------------------------------------------------- > To
> > > > > unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For
> > additional
> > > > > commands, e-mail: users-help@tomcat.apache.org > > -- Jeff
MAURY
> > "Legacy
> > > > > code" often differs from its suggested alternative by actually
> > working and
> > > > > scaling. - Bjarne Stroustrup http://www.jeffmaury.com
> > > > > http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury
> > > >
> > > >
> > > >
> > > >
> > >
> >
> > --
> > Laurent Petit
> >
> > Agence +33 (0)4 78 47 07 49
> >
> > Email     lpetit@yseop.com
> >
> >
> >
> >
> >
> >
> >
> > Yseop apporte une réponse intelligente et individualisée à chacun de vos
> > clients
> >
> >
> >
> > www.yseop.com
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 
> 


-- 
Laurent Petit

Agence +33 (0)4 78 47 07 49

Email     lpetit@yseop.com

 



 

Yseop apporte une réponse intelligente et individualisée à chacun de vos
clients

 

www.yseop.com



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message