Increase SSH connection timeout to 30 seconds and adjust sleep duration to 30 seconds for improved service availability
This commit is contained in:
@@ -108,7 +108,7 @@ local function ssh(command, user, host, port, identity_file)
|
||||
"ssh",
|
||||
"-p", tostring(port),
|
||||
"-o", "BatchMode=yes",
|
||||
"-o", "ConnectTimeout=10",
|
||||
"-o", "ConnectTimeout=30",
|
||||
"-o", "ServerAliveInterval=5",
|
||||
"-o", "ServerAliveCountMax=1",
|
||||
"-o", "UserKnownHostsFile=/root/.ssh/known_hosts",
|
||||
@@ -179,7 +179,7 @@ local function main()
|
||||
ssh("wsl.exe -d Debian -- 'sudo systemctl enable ollama && sudo systemctl start ollama'", "micro", OLLAMA_HOST, SSH_PORT, SSH_IDENTITY_FILE)
|
||||
if (port_is_up(OLLAMA_HOST, OLLAMA_PORT, 90)) then
|
||||
log("Ollama service is reachable again.")
|
||||
socket.sleep(2)
|
||||
socket.sleep(30)
|
||||
else
|
||||
log("Timeout waiting for Ollama service to come up after SSH command.")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user