Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4158

The task-keepalive property in the domain:io subsystem is ignored causing an async servlet timeout at 30 seconds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 8.2.0.Final
    • IO
    • Compatibility/Configuration, User Experience

      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.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              jimi.com.mx Raul Guerrero Deschamps (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: