'Connection timed out' Error During Attachment Download

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

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:

1 2 3 4 5 6 7 8 9 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.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.