tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From youngm <you...@gmail.com>
Subject Re: Slow requests when using "Executor" pool
Date Mon, 08 Feb 2010 18:08:57 GMT

Setting maxKeepAliveRequests="1" seems to fix the issue as well.  Perhaps the
problem has something to do with keep alive requests?  Any other thoughts?

Mike


Filip Hanik - Dev Lists wrote:
> 
> turn off keep alive for your profiler to not give you false positives
> 
>   maxKeepAliveRequests="1"
> 
> 
> <Connector port="8080" protocol="HTTP/1.1" maxKeepAliveRequests="1"
>                  connectionTimeout="20000"
>                  redirectPort="8443" />
> 
> 
> 
> On 02/03/2010 02:14 PM, youngm wrote:
>> (This is a new thread spawned from my "Tomcat 6.0.24 Google Chrome"
>> thread
>> with better information)
>>
>> I'm running Tomcat 6.0.24, Sun JDKx86 6u18, Windows 7 64, Firefox and
>> Chrome
>> browser.
>>
>> I've noticed that for about the first 1-3 min after my tomcat instance
>> has
>> started some of my requests that normally take>  1 sec to be handled are
>> taking 30+ sec to respond.
>>
>> I've narrowed the problem down to my use of an Executor pool to handle
>> requests.  The follwing is my server.xml:
>>
>> <?xml version='1.0' encoding='utf-8'?>
>> <Server port="8005" shutdown="SHUTDOWN">
>>    <Listener className="org.apache.catalina.core.JasperListener" />
>>    <Listener
>> className="org.apache.catalina.mbeans.ServerLifecycleListener"
>> />
>>    <Listener
>> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
>> />
>>    <Service name="Catalina">
>>      <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
>>          maxThreads="150" minSpareThreads="4"/>
>>       <Connector executor="tomcatThreadPool"
>>                 port="8080" protocol="HTTP/1.1"
>>                 connectionTimeout="20000"
>>                 redirectPort="8443" />
>>      <Engine name="Catalina" defaultHost="localhost">
>>        <Host name="localhost"  appBase="webapps">
>>        </Host>
>>      </Engine>
>>    </Service>
>> </Server>
>>
>> If I change<Connector/>  to not use and executor like so:
>>
>> <Connector port="8080" protocol="HTTP/1.1"
>>                  connectionTimeout="20000"
>>                  redirectPort="8443" />
>>
>> I don't experience a problem.
>>
>> I've hooked a profiler up and it appears all of the time is being spent
>> doing a socketRead with the following trace:
>>
>> [Wall Time]  java.net.SocketInputStream.socketRead0(FileDescriptor,
>> byte[],
>> int, int, int)
>> java.net.SocketInputStream.read(byte[], int, int)
>> org.apache.coyote.http11.InternalInputBuffer.fill()
>> org.apache.coyote.http11.InternalInputBuffer.parseRequestLine()
>> org.apache.coyote.http11.Http11Processor.process(Socket)
>>
>> I've tried to analyse the network info with wireshark and see no
>> decernable
>> differences in network traffic between the 2 requests.  I can try
>> analyzing
>> wireshark data further if the list thinks that would be useful.  Though I
>> find it strange that it works fine when not using an Executor.
>>
>> Anyone have any ideas or seen similar behaviour?
>>
>> Thanks,
>> Mike
>>    
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Slow-requests-when-using-%22Executor%22-pool-tp27443550p27503897.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Mime
View raw message