0

I'm using Tomcat 7 (7.0.25) running on Oracle Java 1.6.0_30. I have libtcnative-1 installed and use the APR Connector (org.apache.coyote.http11.Http11AprProtocol).

I try to serve static files using sendfile (but it doesn't matter because this is reproducible without sendfile)

Everything works fine unless the user downloading the file keeps the "Save file" dialog open in his browser for too long. Whe the "save file" dialog is open for more then 10sec before the user clicks ok only a part of the downloaded file is being written on the users machine (usually about 1.08MB).

It seems to be a kind of connection timout due to no activity. Any ideas if there is a setting available to tune the timeout value? Or any idea how to circumvent the problem without getting rid of the APR Connector alltogether?

1 Answers1

0

The two settings which come to mind are disabledUploadTimeout and connectionTimeout. Can you pass on the values of these two ? You can find it in the server.xml file.

souser
  • 5,868
  • 5
  • 35
  • 50
  • I did check this configuration options before. ConnectionTimeout was set to 600000 and disabledUploadTimeout to false – Tomasz Jędzierowski Feb 02 '12 at 09:41
  • Hmm. Is there a firewall/load balancer between the servers and the end user ? From the server itself, can you try downloading the file using a browser/wget ? – souser Feb 04 '12 at 00:28
  • No firewall, no load balancer. If I serve the file static (i.e. without going through a servlet) it works fine. Unfortunately it's not an option as the file is generated dynamically and I also need an mechanism to prevent hotlinking. – Tomasz Jędzierowski Feb 06 '12 at 10:52
  • Agreed, however the images do not take over 10 seconds to download. The next item to check would be whether you can perform the download/"save as" function from the server itself (using a browser/wget/curl). – souser Feb 08 '12 at 06:30