[SOLVED] SFTP connections freeze after being iddle

Questions about cabled networking
Forum rules
Before you post please read this

[SOLVED] SFTP connections freeze after being iddle

Postby HTD on Sun Oct 09, 2011 8:09 pm

OK. Let me rephrase it:

Please help me with sftp connections. Nautilus can handle remote filesystems via SSH/SFTP. I used it since very first version in GNOME. It's the main reason I use Linux, and main reason for GNOME (or KDE).

Until about couple a weeks ago it looked likie this:
I connect to remote server with Nautilus (using bookmarks for frequently userd servers). The directory listing appears immediately, and whole thing works almost as fast as local filesystem. No single problem ever here.

THEN I WRITE CODE OR POST FOR 5 MINUTES OR MORE. WHEN I GET BACK TO NAUTILUS - IT'S FROZEN. I HAVE TO DISCONNECT REMOTE FILESYSTEM AND RECONNECT IT AGAIN.

Why such a strange thing happens? It's very annoying. I use remote filesystem at work, I need directories opened in tabs to organize my work and update files quickly. No, it's not commiting my changes, I really need to manualy check files, upload and download. So Nautilus was the best choice for years.

What happened? It looks like every SFTP connection has a hidden iddle time and it's disconnected without notifying Nautilus it did. Is it a magic setting to block disconnecting? I don't want my connections to be shut down ever! Only manually or on system shutdown.

Now even weirder part. It works good with KDE and Dolphin. No disconnecting. But wait, it worked in GNOME. Please, help.

Recently I tried GNOME 3. Same thing. In KDE/Dolphin connection stay, in GNOME they freeze after about 5 minutes of being idle. I tried to upload a huge directory with Nautilus. It worked for 15 minutes. It doesn't break when I use connection. It does break when it's not used. It looks like a timeout, and if it's a timeout, it should be configurable, but where?

I've added "ConnectTimeout 0" to /etc/ssh/ssh_config - but it didn't help.
Last edited by HTD on Tue Oct 18, 2011 7:21 pm, edited 1 time in total.
HTD
Level 1
Level 1
 
Posts: 46
Joined: Sun May 22, 2011 7:31 pm

Linux Mint is funded by ads and donations.
 

Re: SFTP connections freeze after 5 minutes of being iddle

Postby HTD on Tue Oct 18, 2011 7:20 pm

Why do I always have to reply myself? :)

Here's what I've done, I'm not sure which one has helped:

Added a line to /etc/ssh/ssh_config: "ServerAliveInterval 3".
Used gconf-editor to change /desktop/gnome/session/idle_delay to to 65535.

Restarted /etc/init.d/network-manager , /etc/init.d/ssh, but it didn't help.

I rebooted, and now SFTP in Nautilus works as expected.

First I found this: http://ubuntuforums.org/showthread.php?t=1010463
But it was suspicious that gconf-editor started as root didn't show /desktop/gnome/session key at all.

Then I found this:
http://embraceubuntu.com/2006/02/03/kee ... ons-alive/
and I think this is it.
HTD
Level 1
Level 1
 
Posts: 46
Joined: Sun May 22, 2011 7:31 pm

Re: [SOLVED] SFTP connections freeze after being iddle

Postby randy112 on Sun Aug 19, 2012 11:29 am

Thanks for the feedback, my problem is pretty similar to yours. It's cool that you had the courtesy to explain to everyone how you fixed the issue, by yourself, ironically.
randy112
Level 1
Level 1
 
Posts: 1
Joined: Sun Aug 19, 2012 11:26 am

Re: SFTP connections freeze after 5 minutes of being iddle

Postby Habitual on Sun Aug 19, 2012 11:46 am

HTD wrote:Why do I always have to reply myself? :)....


Sometimes, you just need to write stuff out.
Props for fixing it yourself.
User avatar
Habitual
Level 7
Level 7
 
Posts: 1609
Joined: Sun Nov 21, 2010 8:31 pm
Location: uid=0(root) gid=0(root) groups=0(root)


Return to Ethernet

Who is online

Users browsing this forum: No registered users and 2 guests