Closed pioz closed 1 year ago
I'm not sure, but at first glance this seems like the SSH connection is getting dropped due to inactivity. You might try some of the ideas listed here: https://www.baeldung.com/linux/ssh-keep-alive
I've solved enabling keepalive option:
SSHKit::Backend::Netssh.configure do |ssh|
ssh.connection_timeout = 30
ssh.ssh_options = {
auth_methods: %w[publickey password],
keepalive: true
}
end
I have this snippet of code:
The command to execute on the remote machine is very long, about 4 hours. This script execution stops forever at the
execute
command. If I check on the remote server I can see that the powermysqldump
has finished and has created the dump, but the script does not proceed with subsequent instructions, it stays stuck forever. If I try with a smaller DB (dump takes some seconds) all works fine.Do you have any idea to solve this problem?