geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ruebsam <mario.rueb...@googlemail.com>
Subject Re: Creation of new threads after closing response writer in Servlet in Little-G Jetty 2.0.1
Date Fri, 14 Sep 2007 18:10:58 GMT
The new Treads are created by more than one Servlet requests
when loading a page. The page itself and also serving some
static files.
The new Threads appear all at the same time because of a
synchronized block in SelectChannelEndPoint.undispatch();
Which is called at the line number mentioned in my last mail.

All that looks like normal behaviour. The problem I see is
that all newly created Threads stay alive and none of theses
Threads is reused after that.

I guess there is some problem reusing the Threads in the pool and
every request creates new Threads. The number of 10 new threads
mentioned before relates magically to exact 10 servlet requests
in my test case. On other pages there are lesser or more.
So the number means nothing.

I have no idea about the Thread pool management and don't know
where to start so I give the ball back to you guys on the list.

Thanks,
Mario


Mario Ruebsam wrote:
> Ok, I will download or checkout the Jetty 6.1.5 sources to do some further
> investigation on it.
> 
> Thanks,
> Mario
> 
> 
> Paul McMahan wrote:
>> Mario,  thanks for doing the extra debugging to narrow down where the 
>> problem is at.  Yes the jetty version is 6.1.5.   You can also find 
>> the version number of a component in the admin console's System 
>> modules portlet or by the directory name in Geronimo's repository,  in 
>> this case $G/repository/org/mortbay/jetty/jetty/6.1.5
>>
>> Best wishes,
>> Paul
>>
>>
>> On Sep 14, 2007, at 11:34 AM, Mario Ruebsam wrote:
>>
>>> I did some debugging and followed the code until:
>>>
>>> SelectChannelConnector$ConnectorEndPoint(SelectChannelEndPoint).run() 
>>> line: 422
>>>
>>> when this line is called the Treads will be created.
>>>
>>> I guess this is Jetty code because I could not found it
>>> in the Geronimo sources.
>>>
>>> Which Jetty version is used is Geronimo 2.0.1?
>>> When I look in the sources pom.xml it is 6.1.5, is this the used 
>>> Version?
>>>
>>> Thanks,
>>> Mario
>>>
>>>
>>> Mario Ruebsam wrote:
>>>> Hello,
>>>> after migrating successful from Little-G Jetty 1.1 to Little-G Jetty 
>>>> 2.0.1
>>>> I detected some strange behavior when closing the Servlets response 
>>>> writer.
>>>> Every time the writer is closed Geronimo or Jetty creates 10 new 
>>>> Threads
>>>> in the DefaultThreadPool. The code snippet is below.
>>>> In G 1.1 the same code has no impact on threads.
>>>> Does anybody has the same experience? Is this a Jetty or a Geronimo 
>>>> problem?
>>>> public void doGet(HttpServletRequest pRequest, HttpServletResponse 
>>>> pResponse) throws IOException, ServletException {
>>>>     <... do some stuff ...>
>>>>     PrintWriter tOut = pResponse.getWriter();
>>>>     tOut.write(tData);
>>>>     tOut.close();
>>>> }
>>>> Thanks,
>>>> Mario
>>>
>>
>>
> 
> 


Mime
View raw message