2012/8/23 Nikos Viorres <nvior...@gmail.com>:
> Dear all,
>
> Apologies for duplicate question but i was initially subscribed to the
> digest list only and i am having trouble with follow ups.
>
> The value that i set to Tomcat's asyncTimeout connector property is ignored
> when using the APR connector on Windows no matter what (default 10 seconds
> is used instead). That value is always respected when using the default
> Http11Protocol connector or the Http11NioProtocol one. However in the
> relevant Tomcat docs, it's clearly stated that this property applies to all
> the connectors. Here is the relevant part of server.conf:
>
> <Connector asyncTimeout="25000"
> protocol="org.apache.coyote.http11.Http11AprProtocol"
> port="8080" maxThreads="200" URIEncoding="UTF-8" connectionTimeout="25000"
> compression="on" compressionMinSize="2048" compressableMimeType="text/
> html,text/plain,text/xml,text/css,text/javascript,
> application/json,application/javascript,application/xml,application/css" />
>
> This has been tested on Tomcat 7.0.28 and 7.0.29 installations using
> Windows Service Installer on two different machines, Windows 7 Pro 64 bit
> and Windows 2008 Server R2 (64 bit). Tomcat installations have tcnative.dll
> version=1.1.24.
>

1. I do not see in the code what could be a cause for this.

The timeout is processed in o.a.c.connector.Request#startAsync():
It calls
[[[
  asyncContext.setTimeout(getConnector().getAsyncTimeout());
]]]

So all connectors are treated equally.

There are tests classes that call AsyncContext.setTimeout(). The value
in the tests is 3 seconds.


2. I cannot reproduce your problem

Using 7.0.29 (from apache-tomcat-7.0.29-windows-x86.zip)
I am using Firefox 14, on WinXP 32-bit, JDK 6u34.

I specify the following timeout in server.xml:

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" asyncTimeout="60000" />

Now I access the stockticker example
http://localhost:8080/examples/async/stockticker

and look for how many values are printed until the browser stops
loading the page.

The Stockticker servlet runs a thread with sleep(850).

With the above timeout of 60 seconds it prints 71 or 72 values.
With the default timeout it prints 12 values.
With 25 seconds it prints 30 values.

Best regards,
Konstantin Kolinko

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

Reply via email to