'Connection timed out' Error During Attachment Download
Symptoms
Downloading a large attachment, or when a user goes to the attachments view and clicks Download All, the zip file is created and starts to transfer, but appears to hang and never completes.
The following appears in the atlassian-confluence.log
:
com.atlassian.plugin.servlet.DownloadException: ClientAbortException: java.net.SocketException: Connection timed out
at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:68)
at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:30)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
:
:
Caused by: java.net.SocketException: Connection timed out
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
Cause
In the Standalone version, the Tomcat's connectionTimeout
value is set to 20000 milliseconds (20 seconds). Depending on your connection speed, if you require to have a connection longer than 20 seconds then you need to increase the value. It's a good idea to consider the geographic location of your users to gauge the suitable length of time.
Resolution
Increase the connectionTimeout
. See Tomcat's relevant documentation.