# SSHFS VFS cache failing to flush

**URL:** <https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730>\
**Category:** Help and Support\
**Created:** [October 2, 2025, 4:16pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730 "2025-10-02T16:16:49Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 2, 2025, 4:16pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/1 "2025-10-02T16:16:49Z")

</div>

I am using rclone:  
rclone v1.67.0

- os/version: debian 13.1 (64 bit)

- os/kernel: 6.8.12-13-pve (x86\_64)

- os/type: linux

- os/arch: amd64

- go/version: go1.22.4

- go/linking: static

- go/tags: none

commandline:  
rclone mount dellboy\_encrypted\_folder\_ssh: /home/simon/dellboy --vfs-cache-mode=full --vfs-cache-max-size=4G --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit=256M --buffer-size=32M --multi-thread-streams=4 --dir-cache-time=5s --poll-interval=0 --sftp-concurrency=6 --rc --vfs-cache-max-age=1m

my config is crypt -\> sshfs and seemingly works but performance degrades over time, and I get lots of high intermittent CPU usage with rclone.

I ran rclone in non daemon mode and I am seeing lots of the following error:  
`vfs cache: failed to upload try #8, will retry in 5m0s: vfs cache: failed to transfer file from cache to remote: Update Create failed: sftp: "Bad message" (SSH_FX_BAD_MESSAGE)`

According to ChatGPT lots of things can cause this error such as characters in the filename as well as the length of the filename.

Whilst this (hopefully) could be addressed it isn't my main concern. If I have 10,000 files which I am trying to rename which do not fit in to a supported naming convention in theory could this not back up 10,000 retries which could easily spike the cpu and memory every so often (5m?) as the cache flush is attempted ? In a slightly worse situation, it will never resolve itself either. I also wonder if the flushing could be offset with subsequent moves (before a daemon restart) at a different time.

It appears to me that if SSHFS fails then the file will forever be in limbo in the VFS cache and will never succeed and could result in lost data

#### What is the problem you are having with rclone?

#### Run the command 'rclone version' and share the full output of the command.

#### Which cloud storage system are you using? (eg Google Drive)

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
Paste command here

```

#### Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[dellboy\_alias\_ssh]  
type = alias  
remote = hashing\_ssh:/mnt/Four\_TB\_Array/encrypted/  
[dellboy\_encrypted\_folder\_ssh]  
type = crypt  
remote = dellboy\_alias\_ssh:  
password = XXX  
password2 = XXX  
[dellboy\_sshfs]  
type = sftp  
host = XXX  
pass = XXX  
shell\_type = unix  
md5sum\_command = md5sum  
sha1sum\_command = sha1sum  
[hashing\_ssh]  
type = hasher  
remote = dellboy\_sshfs:  
hashes = sha1

```auto
Paste config here

```

#### A log from the command that you were trying to run with the `-vv` flag

```auto
Paste log here

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [October 2, 2025, 4:47pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/2 "2025-10-02T16:47:10Z")

</div>

> [@simonm](#):
>
> rclone v1.67.0

`rclone selfupdate` and test again.

* * *

keep in mind that hasher remote is **experimental**

fwiw, to keep testing simple, test `dellboy_sshfs:`, make sure that works.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 2, 2025, 7:49pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/3 "2025-10-02T19:49:32Z")

</div>

hasher isn’t anything to do with the issue as far as I am aware. It seems to me as if it’s the limitations of SSHFS not being enforced by rclone in combination with vfs allowing the files to be cached instead of reporting that the move is not possible.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 2, 2025, 7:51pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/4 "2025-10-02T19:51:12Z")

</div>

I also tried renaming the file in the vfs directory, as I assumed it would move the file if the length was shorter but it appeared the vfs component deleted the file instead of transferring it.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 2, 2025, 7:54pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/5 "2025-10-02T19:54:26Z")

</div>

Are you aware of any SSHFS fixes in the version between v1.67 and v171.1 ?

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 2, 2025, 8:08pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/6 "2025-10-02T20:08:59Z")

</div>

to be fair I don’t entirely know what the full function of the VFS cache folder is. Does it store files that are to be moved or is it purely a local copy of something that has already happened ? If vfscache is set to full does the vfs cache store files that are going to be moved/modified ?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [October 2, 2025, 8:38pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/7 "2025-10-02T20:38:04Z")

</div>

> [@simonm](#):
>
> I also tried renaming the file in the vfs directory

cannot do that, will not work.

> [@simonm](#):
>
> to be fair I don’t entirely know what the full function of the VFS cache folder is. Does it store files that are to be moved or is it purely a local copy of something that has already happened ? If vfscache is set to full does the vfs cache store files that are going to be moved/modified ?

check out my [summary of vfs caches](https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34)

rclone mounts the remote as local storage.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [October 2, 2025, 9:05pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/8 "2025-10-02T21:05:39Z")

</div>

> [@simonm](#):
>
> Are you aware of any SSHFS fixes in the version between v1.67 and v171.1 ?

that version is 16 month old. [https://rclone.org/changelog/](https://rclone.org/changelog/)  
update and test again.

* * *

> [@simonm](#):
>
> SSHFS

mount it without using rclone, does it work?

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 3, 2025, 12:00pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/9 "2025-10-03T12:00:56Z")

</div>

What if I have --vfscache-cacache-mode=full and I create a files on a remote to a sshfs server that has a filename that is 500 characters long which it will never accept but my local machine will. What happens to the file ?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [October 3, 2025, 12:33pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/10 "2025-10-03T12:33:11Z")

</div>

> [@simonm](#):
>
> has a filename that is 500 characters long which it will never accept but my local machine will. What happens to the file ?

i assume that rclone will continue to try and fail uploading over and over  
not sure `--retries` applies.

but no need to guess, just do a simple test, read the debug log, then you will know.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 3, 2025, 3:53pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/11 "2025-10-03T15:53:01Z")

</div>

I have watched it retrying in a loop. But imo It shouldn’t. It should never accept the file as it will never get written. Ever. Which will result in the person thinking that the file has been written, but it hassn’t until such time as the vfs cache is deleted or forgotten about, along with the missing/lost data.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [October 3, 2025, 4:25pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/12 "2025-10-03T16:25:17Z")

</div>

> [@simonm](#):
>
> I have watched it retrying in a loop. But imo It shouldn’t. It should never accept the file as it will never get written. Ever.s

There a million SFTP servers out there and what one accepts or rejects would be quite tough to maintain. Rclone wouldn’t know until it tries to write the file to that particular SFTP backend.

> [@simonm](#):
>
> Which will result in the person thinking that the file has been written, but it hassn’t until such time as the vfs cache is deleted or forgotten about, along with the missing/lost data

That’s why for any critical stuff, you’d really want to watch logs regardless. No data would be lost unless someone randomly blew away the cache without checking. That’s the case for all files in there if they have not bee written yet.

There’s no log file so it’s tough to guess what to advise as it’s unknown what is the specific failure or why.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 4, 2025, 8:36am UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/13 "2025-10-04T08:36:54Z")

</div>

> [@simonm](#):
>
> vfs cache: failed to upload try #8, will retry in 5m0s: vfs cache: failed to transfer file from cache to remote: Update Create failed: sftp: "Bad message" (SSH\_FX\_BAD\_MESSAGE)

I think it is the same as this: [crypt over SFTP fails on long/complex filenames (works on GDrive/Mega) · Issue #8777 · rclone/rclone · GitHub](https://github.com/rclone/rclone/issues/8777)

I have file encrpytion turned on too. which may affect the filename length.

I was very surprised that when I made the filename shorter in the vfs cache, I hoped it would transfer it successfully, but it just deleted it. Does the VFS cache engine track filenames and delete things that it has no record of successfully transferring ?

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [October 4, 2025, 8:58am UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/14 "2025-10-04T08:58:25Z")

</div>

You are using default `base32` (5 bits per character) [names encoding](https://rclone.org/crypt/#crypt-filename-encoding) for your crypt remote. It is the least efficient encoding when it comes to file name length - 100 characters file name requires ≈160 characters when encrypted. If your remote allows case sensitive file names then use `base64` (6 bits per character).

And the real game changer is `base32768` (15 bits per character) but you should test first if your remote can use it:

```auto
rclone test info --check-length --check-base32768 dellboy_sshfs:test_dir

```

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [October 4, 2025, 11:05am UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/15 "2025-10-04T11:05:35Z")

</div>

> [@simonm](#):
>
> I was very surprised that when I made the filename shorter in the vfs cache, I hoped it would transfer it successfully, but it just deleted it. Does the VFS cache engine track filenames and delete things that it has no record of successfully transferring ?

You can’t manually change a file and make things work. If you muck around in the cache, bad things happen.

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 15, 2025, 9:15am UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/16 "2025-10-15T09:15:37Z")

</div>

> [@kapitainsky](#):
>
> ng default `base32` (5 bits per character) [names encoding](https://rclone.org/crypt/#crypt-filename-encoding) for your crypt remote. It is the least efficient encoding when it comes to file name length - 100 characters file name requires ≈160 characters when encrypted. If your remote allows case sensitive file names then use `base64` (6 bits per character).

Thanks for taking the time to respond. I did see somewhere that you can modify the name encoding in situ. Do you know where it is detailed how to do this please ?

---

<div class="post-metadata">

**Author:** ![simonm](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@simonm](https://forum.rclone.org/u/simonm)\
**Post date:** [October 15, 2025, 9:17am UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/17 "2025-10-15T09:17:13Z")

</div>

> [@kapitainsky](#):
>
> `rclone test info --check-length --check-base32768 dellboy_sshfs:test_dir`

rclone test info --check-length --check-base32768 dellboy\_sshfs:test\_dir  
2025/10/15 10:16:11 NOTICE: sftp://gg@localserver:22/test\_dir/rclone-test-info-xasijiw7/test-base32768: 0 differences found  
2025/10/15 10:16:11 NOTICE: sftp://gg@localserver:22/test\_dir/rclone-test-info-xasijiw7/test-base32768: 1028 matching files  
// dellboy\_sshfs  
maxFileLength = 255 // for 1 byte unicode characters  
maxFileLength = 127 // for 2 byte unicode characters  
maxFileLength = 85 // for 3 byte unicode characters  
maxFileLength = 63 // for 4 byte unicode characters  
base32768isOK = true // make sure maxFileLength for 2 byte unicode chars is the same as for 1 byte characters

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [October 15, 2025, 12:09pm UTC](https://forum.rclone.org/t/sshfs-vfs-cache-failing-to-flush/52730/18 "2025-10-15T12:09:12Z")

</div>

> [@simonm](#):
>
> Do you know where it is detailed how to do this please ?

on this forum:) shouldn’t be to hard to find it.

You simply create another crypt remote config (with new names encoding) with the same password(s) but different base directory and move/copy files using `--server-side-across-configs` flag

> [@simonm](#):
>
> maxFileLength = 127 // for 2 byte unicode characters

not ideal for for `base32768` but still worth to consider. 127 \* 15 bits / 8 bits = 238 one byte characters. Better than `base64` (255 \* 6 / 8 = 191).

> [@simonm](#):
>
> base32768isOK = true

The key is that all required characters are supported.
