# Rclone Plex initial connect lag

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

I’ve been using rclone with Gsuite for Plex successfully but always have a strange issue when I first connect via iOS Plex app and view any show/movie. I get a spinning loading sign at the bottom of the app for about 15 seconds before it shows the subtitle/audio selection settings. During this time hitting play is unresponsive for same amount of time. What’s strange is after this initial “wake up lag” everything is responsive when I browse to any other media etc. I get a feeling I’m missing a setting somewhere?

#### What is your rclone version (output from rclone version)

- os/arch: windows/amd64
- go version: go1.15



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

My internet is gigabit 1G/600M running on Windows 10 64bit directly not using docker. Plex database and rclone on ssd, cpu ryzen 3600x 16GB ram

Gsuite

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

rclone mount --allow-other  --vfs-cache-max-age 1h --vfs-cache-poll-interval 1m --dir-cache-time 5m --drive-chunk-size 128M --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off media_union: P: --config "C:\Users\XXX\.config\rclone\rclone.conf" --vfs-cache-mode writes



#### The rclone config contents with secrets removed.


[gdrive]
type = drive
client_secret = REDACTED
scope = drive
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2020-09-14T11:40:57.7176801+08:00"}
root_folder_id = REDACTED

[media_union]
type = union
remotes = gdrive: D:\media_union



#### A log from the command with the -vv flag

Paste  log here


You'd want to post a debug log to see what rclone is doing as that part is missing so it's a bit of a guessing game.

Yes working on figuring how to do that right now sorry

I guess your library is somewhat large?
This could help:
change
--dir-cache-time 5m
to something long like
--dir-cache-time 500h
long dir cache time is no problem because rclone polls for changes every minute in gdrive anyway

hello,

what version of rclone are you running, as it is not listed in the snippet you posted?
you should be using v.1.53.1, as it as a new, much better vfs cache.
with that version, try --vfs-cache-mode=full

to add a debug log, just change the log file location.
--log-level=DEBUG --log-file=c:\path\to\local\folder\log.txt

on windows, --allow-other does nothing.

as a test, perhaps remove these flags and use defaults.
--drive-chunk-size 128M --vfs-read-chunk-size 128M
perhaps when plex starts up, it does a lot of small reads, in random locations.

Yes, changing the dir cache time helped immensely! Thank you!

I'm trying vfs-cache-mode=full now

I'm reading a bit on the configuration, there is a part that says this about chunked reading:

Chunked reading will only work with --vfs-cache-mode < full, as the file will always be copied to the vfs cache before opening with --vfs-cache-mode full.

I'm not fully sure what that means, < full or = full?

I think that bit of docs is wrong. It applies to all cache modes now.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.