Git LFS Push of large files results in a failure with i/o timeout

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Summary

When pushing large objects with Git LFS, the push fails with an i/o timeout error.

Environment

  • Bitbucket Server & Data Center

  • Git LFS

Diagnosis

The git client displays the following:

~ username > git push
Uploading LFS objects: 0% (0/1), 2 GB | 104 MB/s, done.
LFS: Put "https://example.com/rest/git-lfs/storage/EXAMPLE/example-repo/d1786cec9c0d23b42e088b57b425f9f9fcfcad53": read tcp 192.168.0.1:1046->192.168.1.1:443: i/o timeout
error: failed to push some refs to 'https://example.com/rest/git-lfs/storage/EXAMPLE/example-repo.git'~ username >

The key part of the message above is: read tcp 192.168.0.1:1046->192.168.1.1:443: i/o timeout

Cause

LFS is timing out waiting for the next TCP read or write. This is generally seen when pushing larger objects or a large commit, containing multiple large objects.

Solution

To resolve, the user will need to increase the lfs.activitytimeout value for their git client. Depending on the version of your client, recent versions have a default value of 30 seconds. In the below command, we will increase to 60 seconds. 

git config lfs.activitytimeout 60

Resource: Git LFS config manual



Last modified on Jul 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.