You are not logged in.

#1 2021-04-22 03:26:44

k395
Member
Registered: 2020-01-29
Posts: 37

Avoid hang with curlftpfs after remote machine is disconnected?

Currently if I do something like this

* Set up a remote FTP server.
* Use curlftpfs to mount it to a directory, say /path/a.

curlftpfs -o auto_unmount -o cache_timeout=1 -o connect_timeout=1 "ftp://1.2.3.4:5" /path/a

* Turn off the server.
* Do "ls /path".

The command hangs.

Note that I cannot reliably reproduce this issue, sometimes "Input/output error" is reported instead.

I'm aware that they're caused by I/O hang, but how can I configure the programs so that when the server is not connectable in X seconds, it should report an error or (preferred) unmount the directory?

The common options doesn't fix the issue. (cache_timeout, connect_timeout)

I can see that there are some curlftpfs forks (curlftpfs-ng for example), but that doesn't fix the issue.

The issue can be fixed if I execute in a new terminal

fusermount -uz /path/a

then forcefully terminate the hung commands, however that's inconvenient.

Last edited by k395 (2021-04-22 03:33:11)

Offline

Board footer

Powered by FluxBB