Windows – Apache timeout – large file downloads

apache-2.4tomcatwindows

A website I manage has to occasionally serve up large files over the internet, and this usually results in a failed HTTP 500 Internal Server error. However, I can reproduce this issue locally by going to localhost

From what I can tell looking at the logs, this is happening during due to the client aborting the connection and it is always after 60 seconds.

Server log:

Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException

Does anyone know which timeout is being reached? It only happens with large files so my assumption is that download time is being considered as idle. One thing that is peculiar is that I'm not getting prompted to open/save the file. I select the link to the file, 60 seconds later I get the HTTP 500 response. Any suggestions or advice would be appreciated.

Best Answer

The error message from your stack trace is indicative of a client abort of the download. The client need not be the actual end user but can also be a proxy server in between.

If you have Apache in front of Tomcat and are using mod proxy ajp, 60 seconds is the default value of the TimeOut directive in Apache.

You can increase the time out for the proxy requests to Tomcat with the ProxyTimeOut directive.