At 14:04 02/16/01, Santiago Gala wrote:
>ingo schuster wrote:
>
>>Sorry,
>>I mixed up two different things: The EcsServletElement uses the
>>RequestDispatcher - that's absolutely safe.
>>I thought it'd open an URL connection (as it the DiskCach does) and this
>>would result in looping from the servlet container, through the web
>>server back to the servlet container - that's bad as you can deadlock the
>>system with this setup. We ran into this problem: A portlet used a
>>servlet as a connector to it's data. For demonstration purposes we tried
>>to run this connector servlet on the same machine... So don't use the
>>DiskCache to access servlets on the same machine.
>
>
>Please Ingo, tell me more about this. I am working on DiskCache v2, and I
>want to know all potential problems that can arise.
>
>If the call is done through the DiskCache, and the response is worked
>through a servlet container thread, I cannot see where the problem can be,
>except if it is deep down in the java protocol handler or you exahust
>worker threads in the servlet container.
>
>I know there are some issues with InetAddress name resolution, specially
>in older versions of the jdk, that can deadlock the involved threads. But
>I have not seen these issues happen in jdk1.3 (only in 1.2.2 and 1.1.x
>green threads, where it really stinks)
>
Imagine following scenario:
Your servlet container has a thread pool of 50 threads. Now, if 50 requests
hit the servlet container at the same time, all threads are in use, if
there comes another one, it'll be queued. If the 50 working threads open an
HTTP connection to a servlet that runs in the same container, these new
requests will have to wait until the other threads have finished. So
they'll wait forever - or at least very long until they get a timeout.
A second scenario: The webserver accepts 500 connections and has a
threadpool of 200. If 200 request hit the HTTP server at once, they are
pased on to the servlet engine, open an HTTP connection to a servlet on the
same server - and are queued in the HTTP server forever (as all HTTP server
threads are busy at this time).
The likelyhood of such problems raises dramatically with long request
processing times (which we have in Jetspeed).
I'm not sure if you can prevent developers from using the diskcache to
connect to the same servlet engine that Jetspeed is running in. But it
doesn't make much sense anyway, within a servlet engine you can direct
calls. So a recommendation not to use the DIskCache for connections to the
same server might be good enough.
ingo.
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Search: <http://www.mail-archive.com/[email protected]/>
>List Help?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?: [EMAIL PROTECTED]