]
Jason Greene reassigned WFLY-4158:
----------------------------------
Assignee: Tomaz Cerar (was: Jason Greene)
The task-keepalive property in the domain:io subsystem is ignored
causing an async servlet timeout at 30 seconds
----------------------------------------------------------------------------------------------------------------
Key: WFLY-4158
URL:
https://issues.jboss.org/browse/WFLY-4158
Project: WildFly
Issue Type: Bug
Components: IO
Affects Versions: 8.2.0.Final
Environment: Windows Server 2008, Windows 7, Java SE 7u72 and 8u25 64bit
Reporter: Raul Guerrero Deschamps
Assignee: Tomaz Cerar
Labels: asynchronous, servlet, timeout
I have a file upload and download asynchronous servlet, I define a ReadListener and
WriteListener to process the files.
To be able to handle really large files, I setted a property in the IO subsystem to have
the IO thread timeout at one hour using the task-keepalive property to avoid leaked
threads if the request has a problem:
<subsystem xmlns="urn:jboss:domain:io:1.1">
<worker name="default" task-keepalive="3600"/>
<buffer-pool name="default"/>
</subsystem>
And also set the max-post-size property to the maximum to avoid limiting the size of the
file, so you can upload files of any size as long as it only takes one hour, this is an
intranet application so we don't have bandwidth issues or timeouts for the uploads and
downloads.
<subsystem xmlns="urn:jboss:domain:undertow:1.2">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default"
socket-binding="http" max-post-size="0"/>
...
Now, this works perfectly on WildFly 8.1.0 Final, but I upgraded to 8.2.0, and even
though I setted the same properties, I get an exception exactly at 30 seconds after a
request for an upload or download:
ERROR [io.undertow.request] (default task-32) Undertow request failed HttpServerExchange{
PUT /xxx/file}: java.lang.NullPointerException
Followed by:
ERROR [org.xnio.listener] (default I/O-1) XNIO001007: A channel event listener threw an
exception
Which is what happens when an I/O thread times out, so it causes the NullPointerException
in the servlet because the IO thread is gone.
Even though I set any time on the task-keepalive property, still the IO thread gets
always killed at 30 seconds.