Bug on scaning plex with Rclone - unmount / transport end point is not connected

What is the problem you are having with rclone?

when I scan my plex server the rclone is unmounted, I don't know why this happens, interestingly it happens only with some files, because when I scan other files I have no problems.

What is your rclone version (output from rclone version)

Rclone v1.51.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubunu server 18.04.03

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

Google Drive

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

[Unit]

Description=RClone VFS Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/root/.config/rclone/rclone.conf

ExecStart=/usr/bin/rclone mount --allow-non-empty --allow-other --dir-cache-time 72h --buffer-size 256M --drive-chunk-size 32M --fast-list --log-level DEBUG --log-file /home/logs.log --timeout 1s --umask 002 --vfs-cache-mode writes --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 3G gdrive: /home/gdrive

ExecStop=/bin/fusermount -uz /home/gdrive
Restart=on-failure

[Install]
WantedBy=default.target

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E07.mp4: ChunkedReader.Read at 165670912 length 1048576 chunkOffset 67108864 chunkSize 134217728
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E07.mp4: ChunkedReader.Read at 166719488 length 1048576 chunkOffset 67108864 chunkSize 134217728
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E08.mp4: ChunkedReader.Read at 5238784 length 1048576 chunkOffset 0 chunkSize 67108864
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E08.mp4: ChunkedReader.Read at 6287360 length 1048576 chunkOffset 0 chunkSize 67108864
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E08.mp4: ChunkedReader.Read at 7335936 length 1048576 chunkOffset 0 chunkSize 67108864
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E08.mp4: ChunkedReader.Read at 8384512 length 1048576 chunkOffset 0 chunkSize 67108864
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E07.mp4: ChunkedReader.Read at 167768064 length 1048576 chunkOffset 67108864 chunkSize 134217728
2020/02/10 22:51:23 DEBUG : SERIEX/gfbgfbgfb/S01E08.mp4: Attr:
2020/02/10 22:51:24 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--allow-non-empty" "--allow-other" "--dir-cache-time" "72h" "--buffer-size" "256M" "--drive-chunk-size" "32M" "--fast-list" "--log-level" "DEBUG" "--log-file" "/home/logs.log" "--timeout" "1s" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "3G" "gdrive:" "/home/gdrive"]
2020/02/10 22:51:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/02/10 22:51:24 DEBUG : Google drive root '': Mounting on "/home/gdrive"
2020/02/10 22:51:24 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2020/02/10 22:51:24 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2020/02/10 22:51:24 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--allow-non-empty" "--allow-other" "--dir-cache-time" "72h" "--buffer-size" "256M" "--drive-chunk-size" "32M" "--fast-list" "--log-level" "DEBUG" "--log-file" "/home/logs.log" "--timeout" "1s" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "3G" "gdrive:" "/home/gdrive"]
2020/02/10 22:51:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/02/10 22:51:24 DEBUG : Google drive root '': Mounting on "/home/gdrive"
2020/02/10 22:51:24 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2020/02/10 22:51:24 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2020/02/10 22:51:24 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--allow-non-empty" "--allow-other" "--dir-cache-time" "72h" "--buffer-size" "256M" "--drive-chunk-size" "32M" "--fast-list" "--log-level" "DEBUG" "--log-file" "/home/logs.log" "--timeout" "1s" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "3G" "gdrive:" "/home/gdrive"]
2020/02/10 22:51:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/02/10 22:51:24 DEBUG : Google drive root '': Mounting on "/home/gdrive"
2020/02/10 22:51:24 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2020/02/10 22:51:24 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2020/02/10 22:51:25 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--allow-non-empty" "--allow-other" "--dir-cache-time" "72h" "--buffer-size" "256M" "--drive-chunk-size" "32M" "--fast-list" "--log-level" "DEBUG" "--log-file" "/home/logs.log" "--timeout" "1s" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "3G" "gdrive:" "/home/gdrive"]
2020/02/10 22:51:25 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/02/10 22:51:25 DEBUG : Google drive root '': Mounting on "/home/gdrive"
2020/02/10 22:51:25 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2020/02/10 22:51:25 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2020/02/10 22:51:25 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--allow-non-empty" "--allow-other" "--dir-cache-time" "72h" "--buffer-size" "256M" "--drive-chunk-size" "32M" "--fast-list" "--log-level" "DEBUG" "--log-file" "/home/logs.log" "--timeout" "1s" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "64M" "--vfs-read-chunk-size-limit" "3G" "gdrive:" "/home/gdrive"]
2020/02/10 22:51:25 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/02/10 22:51:25 DEBUG : Google drive root '': Mounting on "/home/gdrive"
2020/02/10 22:51:25 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2020/02/10 22:51:25 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

This is a bad one to have as it allows for over mounting. You should remove this.

Does nothing on a mount and can be removed.

You have 256M per file that is opened so a Plex scan would chew up a lot of memory. How much memory do you have on the system?

I'd guess that systemd is stopping it? You'd have to put systemd in debug to catch the error though. rclone never crashes or stops based on the debug logs. It seems to just remount on a busy mount point and spits out that error.

The way a fuse mount works is if it is stopped but things are still accessing it, it won't fully unmount until those actions are done so you get the error you described. You have to stop all the IO on the mount point and it would unmount.

What does journalctl -u -b show?

thanks for take attention my problem, you will see respect to my memory ram i have 8gb en un vps, i will try to do it whitout -- fast list and --allow-non-empty, and i will put it whitout systemd

**What does journalctl -u -b show?

it´s shows:
-- Logs begin at Mon 2020-02-10 21:50:11 UTC, end at Tue 2020-02-11 02:54:52 UTC. --
-- No entries --

I just entered the code this time directly without systemd and the same thing has happened again, I will attach the log debug file so I can review it.log debug

I want to add, that this happens only with the files of the tv series "Pablo Escobar" are MP4, the strange thing is that it only happens with those files, because when I add other series there are no problems.

Is it possible that it is a vfs problem? Or maybe this config is wrong

rclone" "mount" "--allow-other" "--log-level" "DEBUG" "--log-file" "/home/log.log" "--timeout" "1h" "--umask" "002" "--vfs-cache-mode" "writes" "--vfs-read-chunk-size" "128M" "--vfs-read-chunk-size-limit" "off" "gdrive:" "/home/gdrive"

I just used this code, as you can see I removed several random flag, to test if it works this way and curiously, it is working normally, the truth is that I am very confused, because this gives me a sense that the problem is in the combination of the flags.

Now, I would like you to help me see if this configuration is possible to use for my plex, without Google banning the api. Can you help me reconfigure a new code? Or would this be fine?

I updated my rclone:

rclone mount xxxxx: /xxxx/xxxxx
--allow-other
--dir-cache-time 72h
--drive-chunk-size 32M
--log-level DEBUG
--log-file /home/Roger.log
--timeout 30m
--umask 002
--vfs-read-chunk-size 128M
--vfs-read-chunk-size-limit off &

you rigth!!!. buffer size was so high. now is default 8m and its works!!!.. yheeee.

Just a tip, you can also remove the vfs-read-chunk-size and let it remain as the default value. Setting it to such a high value when buffer-size is so low will be wasteful.

Sounds good.

For the journalctl, you can remove the -b and see what the full log. I guess you rebooted your system along the way?

yes, i restarted all the system. i tried to did it without -b, but there is no entry too. but Im confused cause @darthShadow said that vfs-read-chunk-size 128M it must be removed or let it remain as the default value, but it is not the same? cause the default is 128M

--vfs-read-chunk-size SizeSuffix         Read the source objects in chunks. (default 128M)

is necessary erase --vfs-read-chunk-size? I know that --buffer-size as a default is 8M. is there a serious problem with this? please I would appreciate your opinion

I missed that the default was already 128M. In that case, it shouldn't make a difference whether you specify that option or not.