This looks a little old, so I'm not sure if you've already found an answer, but I've recently solved a similar issue.
This problem is compounded by multiple issues:
- The new files browser always pulls information about the various filesystems that are available to it - meaning if you have 5 mounted shares, whether they are SSH, CIFS, or NFS and are visible under the "network" section of the places pane (left side), they will always have an fread() called on them.
- Some of these shares, will take longer to respond - even with proper credentials, and will make it appear that nautilus has hung when opening it up after a period of inactivity, or if a server goes away.
- Many other applications cause nautilus fread()s - I witnessed this doing an strace on the nautilus process, but this issue seems to be connected only when something requests a full list (like a file open window).
- Any time you open nautilus up (by just clicking on the file folder icon in your panel) it does a scan of the folders in your home directory and the contents inside. If you make your mount point something like /home/$user/server_mount then nautilus will hang when the server becomes unavailable.
Note, this also affects other applications like Evolution. Receiving calendar events, or replying to a message would cause Evolution to 'dim' as it was waiting. I'm guessing it was requesting a full file listing for the attachment button, but I didn't investigate that further.
My quick solution for myself, was to just unmount the network shares I had connected to. For now, I'll only connect when I need to access the resources, then unmount when I'm done.
You're semi-permanently attached, so your solution will be a bit different, and its something I've done in the past.
- To handle reattaching after the server comes back up, you'll want to use an automounter - like autofs
- To handle the nautilus hangs when the server isn't available, relocate the mount point somewhere that isn't a default starting point for nautilus, like a sub-directory. /home/$user/mounts/server_mount
- You'll need to have your mount gracefully fail back to your application in a timely fashion when the sever goes away. To do that, you'll want to add the
soft,retrans=1,retry=0,intr
switches to your mount. If memory serves me correctly, the retrans,retry values only work with NFS over UDP, which is the default. If you're using it over TCP, then the timeout values will be based on the TCP stack settings.
HTH