tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre StĂžlsvik <En...@Stolsvik.com>
Subject [tc3.2] Connection fails?
Date Mon, 26 Mar 2001 11:18:39 GMT
I have a frameset with two frames which is a servlet which loads a servlet
into each fram, which in turn triggers the load of a stylesheet which is a
servlet. And then there's static files; images. This implies that there is
at least 5 connections, and these _might_ be simultaneous (I guess
browsers don't open more than 4 anyway, but..)

This is done through Apache and mod_jk over ajp12.

The problem I'm experienceing is that sometimes the stylesheet doesn't get
loaded. It's just "sometimes", and that's makes me wonder. If I click
furisously on reload, it seems to happen a lot.. note: I only have a few
handlers specified..

What I'm wondering, is if the connection handler in tc3.2 is similar to
the one in 4.0, that is, does it just _drop_ a connection if there isn't
any "workers" left to do that request? And if this is so, doesn't anything
get logged about this??


[ If this IS true, I still think that it would be very interesting to
check out how a queue of connections would handle this problem. It would
go something like this: A handler is listening. For each connection that
arrives, it checks the workerstack for a available worker. If there is
one, dispatch it (and log something!!). If there isn't, put it in a synced
connection queue. When a worker is about to put itself back on the stack,
it first checks the connection queue whether there is connection waiting
there to be handled. If there is, handle it (and log something!!), if
there isn't, put yourself back on the stack. If the queue gets to big (a
limit), the server would have to reject connections (and DEFINATELY log
something!!).
  The point here is that this would at least handle surges in connections
pretty good. Also, there are people who believe that a "event queue" uses
available CPU better than having a large bunch of threads hanging around,
which gets preemtped up and down. Let one thread finish what it's doing
before you start doing something else. But of course, you have database
access and that stuff going on too..
  Just a thought.. ]

-- 
Mvh,
Endre


Mime
View raw message