Domanda

I am working on a JSF based web application that provides open/save dialog for the user to download an XML file. If user clicks open/save immediately once open/save dialog appears, the file is downloaded completely. But if there is a delay of more than 90sec, the file is either not downloaded or the downloaded contents are incomplete. (Incomplete file download when waiting minutes before clicking open/save in dialog)

I am using Glassfish V3 server. After going through the Glassfish survival guide in java.dzone, I modified com.sun.grizzly.writeTimeout to 300000. As per my understanding from various blogs, this jvm option corresponds to the time before Grizzly stop waiting for the browser to read the response bytes. By default, if the browser haven’t read all the response bytes after 30 seconds, Grizzly drops the connection. As I have changed to 300000ms, I thought Grizzly will drop the connection after 300seconds. However, now the contents are properly downloaded if the waiting time to click open/save is < 15 minutes. If waiting time is more than 15 minutes, the contents are incomplete. I would like to know the behavior and impact of com.sun.grizzly.writeTimeout on file download.

Any inputs are appreciated.

È stato utile?

Soluzione

Grizzly makes 3 attempts to send at least 1 byte of data. Each attempt may take {com.sun.grizzly.writeTimeout} milliseconds.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top