Git SSH push timeout on large changes
Symptoms
Git push error:
'receive-pack' timed out on server.fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: failed to push some refs to 'ssh://git@xxx'
Cause
Pushing large changes require more time than the default timeout.
Resolution
- Increase timeout from Bitbucket Server instance
- Create
BITBUCKET_HOME/bitbucket.properties
file (if it doesn't exist yet) Add the following properties
######################################################################################################################## # SSH command execution ######################################################################################################################## # Controls timeouts for all SSH commands, such as those that service git and hg operations over SSH. The idle timeout # configures how long the command is allowed to run without writing any output to the client. For SCM commands, the # plugin.*.backend.timeout.idle properties defined above will be applied to the underlying process. The default value # is 1 day. # This values is in SECONDS. plugin.ssh.command.timeout.idle=86400 ######################################################################################################################## # Git Settings ######################################################################################################################## # Defines the idle timeout for push/pull processes, applying a limit to how long the operation is allowed to execute # without either producing output or consuming input. The default value is 30 minutes. # This value is in SECONDS. plugin.bitbucket-scm-git.backend.timeout.idle=1800 # Defines the execution timeout for push/pull processes, applying a hard limit to how long the operation is allowed to # run even if it is producing output or reading input. The default value is 1 day. # This value is in SECONDS. plugin.bitbucket-scm-git.backend.timeout.execution=86400
- Restart Bitbucket Server
- Create
- Increase the timeout in user machine
- Create
~/.ssh/config
file (if it doesn't exist yet) Add SSH ServerAliveInterval ServerAliveCountMax settings into the file, eg:
Host * ServerAliveInterval 86400 ServerAliveCountMax 4
- Create
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.