Use -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3
The combination ServerAliveInterval=15,ServerAliveCountMax=3
causes the I/O errors to pop out after one minute of network outage. This is important but largely undocumented. If ServerAliveInterval
option is left at default (so without the alive check), processes which experience I/O hang seem to sleep indefinitely, even after the sshfs gets reconnect
‘ed. I regard this a useless behavior.
In other words what happens on -o reconnect
without assigning ServerAliveInterval
is that any I/O will either succeed, or hang the application indefinitely if the ssh reconnects underneath. A typical application becomes entirely hung as a result. If you’d wish to allow I/O to return an error and resume the application, you need ServerAliveInterval=1
or greater.
The ServerAliveCountMax=3
is the default anyway, but I like to specify it for readability.
Related Posts:
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- mysql_config not found when installing mysqldb python interface
- Pseudo-terminal will not be allocated because stdin is not a terminal
- X11 forwarding request failed on channel 0
- mysql_config not found when installing mysqldb python interface
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- How to configure WP filesystem access in Linux (Ubuntu Server)?
- Can I automatically add a new host to known_hosts?
- Can I nohup/screen an already-started process?
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- Setting the hostname: FQDN or short name?
- Is it normal to get hundreds of break-in attempts per day?
- How to reconnect to a disconnected ssh session
- how to disable SSH login with password for some users?
- Should I quit using Ifconfig?
- Keeping a linux process running after I logout
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- how do you create an ssh key for another user?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- Does getting disconnected from an SSH session kill your programs?
- Can you have more than one ~/.ssh/config file?
- What is this IP address: 169.254.169.254?
- SSH from A through B to C, using private key on B [closed]
- Show all users and their groups/vice versa
- How to determine the hostname from an IP address in a Windows network?
- Temporarily ignore my `~/.ssh/known_hosts` file?
- How to get TX/RX bytes without ifconfig?
- How can I fully log all bash scripts actions?
- What’s wrong with always being root?
- Hundreds of failed ssh logins
- How to check the physical status of an ethernet port in Linux?
- protocol version mismatch — is your shell clean?
- Testing UDP port connectivity
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- Explaining the ‘find -mtime’ command
- Creating a new directory in C
- mv: cannot stat error : No such file or directory error
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- linux command to get size of files and directories present in a particular folder?
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- ./configure : /bin/sh^M : bad interpreter
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How to use regex with find command?
- What is the difference between /etc/rc.local and ~/.bashrc?
- Snort Message – WARNING: No preprocessors configured for policy 0
- How to make rpm auto install dependencies
- How do I install chkconfig on Ubuntu?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Apache server keeps crashing, “caught SIGTERM, shutting down”
- List all mounts in Linux
- How to use sed to extract substring
- Wait for user input in C?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- tar: Error is not recoverable: exiting now
- cd into directory without having permission
- python-dev installation error: ImportError: No module named apt_pkg
- How to enable Bash in Windows 10 developer preview?
- WordPress sites being filled with random PHP files
- how to properly mount external server directory for wordpress uploads
- WordPress cloning issue
- Is it a good idea to edit WordPress within Eclipse? [closed]
- Can scp copy directories recursively?
- Copying a large directory tree locally? cp or rsync?
- What are the functional differences between .profile .bash_profile and .bashrc
- Check if port is open or closed on a Linux server?
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- When does `cron.daily` run?
- How to run a command multiple times, using bash shell?
- What does a + mean at the end of the permissions from ls -l?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- Force dig to resolve without using cache
- Why do consoles sometimes hang forever when SSH connection breaks?
- Colors in bash after piping through less?
- Why does sudo command take long to execute?
- How to display certain lines from a text file in Linux?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- GPG does not have enough entropy
- Why don’t EC2 ubuntu images have swap?
- create home directories after create users
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?