You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Noelpp <na...@gmx.ch> on 2001/02/01 07:36:39 UTC

Redirecting and Broken Streams with Tomcat under IIS

Hello Web Developers!

I found out that redirects (response.sendRedirect()) don't
always work with Tomcat started from IIS. Sometimes contents
of the two JSP pages get mixed up, sometimes IIS just hangs.
The hang happens when we are using file upload (using
jspSmartUpload) and redirecting. Sometimes adding return;
after a redirect() helps as a work-around.

In an other part of the web application there is some broken
stream detection to cancel some operations when the web app
user prematurely disconnects (catching an IOException
flushing the response buffer: response.flushBuffer() and
cancelling the rest of the operation when an exception
occurs). This detection doesn't work anymore running under
IIS.

Does someone of you know of such issues with IIS?

We are using IIS 5 on Windows NT 4 and the ISAPI redirector
from Jakarta. The Tomcat worker uses ajp12 (out of process).

Daniel Noelpp


Re: 46 java threads???

Posted by Alex Fernández <af...@tid.es>.
Aren't they part of a thread pool?

You don't want to initialize a thread every time a request comes; instead,
you better have them ready and waiting to serve incoming petitions. They
won't eat into your memory until they're used, and they share the same
memory.

Actually, for a production server I think 46 is not too much; just compute
your peak traffic and the time it takes to serve them. E.g., if you expect
40 requests/sec and each one takes 2 secs to fulfill, 80 threads in the
pool would be a good bet.

To find out how long it takes to serve a request, do a load test on your
pages. Take into account that it takes longer when the traffic is high.

Cheers,

Alex.

James Diggans wrote:

> I have tomcat running through mod_jk along with Apache. When tomcat is
> launched it does so flawlessly but launches FORTY SIX 'java' threads,
> each taking ~10MB of what gtop declares 'resident' memory (yes, 460MB
> total). Now I realize these are probably sharing a memory space (since
> I dont HAVE 460MB of RAM or swap) but is there a reason it's starting
> 46 threads? And can anyone tell me where I can configure this? It
> seems ...... high.
>
> Regards,
> - j
>
> ----------------------------------------------------------------------
> --------------
> James C. Diggans
> Excelsior Technologies, Inc.           At what point did we stop
> jdiggans@excelsior-web.com         being citizens and start
> http://www.excelsior-web.com       being mere 'consumers'?
> ----------------------------------------------------------------------
> --------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org


46 java threads???

Posted by James Diggans <jd...@excelsiortech.com>.
I have tomcat running through mod_jk along with Apache. When tomcat is
launched it does so flawlessly but launches FORTY SIX 'java' threads,
each taking ~10MB of what gtop declares 'resident' memory (yes, 460MB
total). Now I realize these are probably sharing a memory space (since
I dont HAVE 460MB of RAM or swap) but is there a reason it's starting
46 threads? And can anyone tell me where I can configure this? It
seems ...... high.

Regards,
- j

----------------------------------------------------------------------
--------------
James C. Diggans
Excelsior Technologies, Inc.           At what point did we stop
jdiggans@excelsior-web.com         being citizens and start
http://www.excelsior-web.com       being mere 'consumers'?
----------------------------------------------------------------------
--------------


RE: Redirecting and Broken Streams with Tomcat under IIS

Posted by "Etienne Baert (SPS Office)" <eb...@sps.be>.
Hi Daniel,

we also had the problem with response.sendRedirect().
In fact, the sendRedirect() was sent when already html
tags were sent to the browser. We avoided that problem
by using a workaround : the sendRedirect is now pointing
to a javascript function = location.replace() that will
reset all header information and send the URL as a complete
new page.

Etienne

-----Original Message-----
From: Daniel Noelpp [mailto:nalp@gmx.ch]
Sent: jeudi 1 fevrier 2001 7:37
To: tomcat-user@jakarta.apache.org
Subject: Redirecting and Broken Streams with Tomcat under IIS


Hello Web Developers!

I found out that redirects (response.sendRedirect()) don't
always work with Tomcat started from IIS. Sometimes contents
of the two JSP pages get mixed up, sometimes IIS just hangs.
The hang happens when we are using file upload (using
jspSmartUpload) and redirecting. Sometimes adding return;
after a redirect() helps as a work-around.

In an other part of the web application there is some broken
stream detection to cancel some operations when the web app
user prematurely disconnects (catching an IOException
flushing the response buffer: response.flushBuffer() and
cancelling the rest of the operation when an exception
occurs). This detection doesn't work anymore running under
IIS.

Does someone of you know of such issues with IIS?

We are using IIS 5 on Windows NT 4 and the ISAPI redirector
from Jakarta. The Tomcat worker uses ajp12 (out of process).

Daniel Noelpp


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org