Regularly hitting limits on Google Drive/Plex

What is the problem you are having with rclone?

Plex Playback won't start, Google Drive states bandwidth limit has been reached.

What is your rclone version (output from rclone version)

1.56.0

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

Google Drive

The rclone config contents with secrets removed.

[google-drive]
type = drive
client_id = <removed>
client_secret = <removed>
scope = drive
token = {"access_token":"<removed>
team_drive =
stop_on_upload_limit = true

rclonefs.service file

[Unit]
Description=Mount Google Drive (Rclone)
After=syslog.target local-fs.target network.target

[Service]
EnvironmentFile=/var/local/Gooby/Docker/.env

Type=simple
User=soopahfly
Group=soopahfly
ExecStartPre=/bin/mkdir -p ${RCLONEMOUNT}
ExecStart=/usr/bin/rclone mount
--allow-other
--buffer-size 0M
--dir-cache-time 96h
--gid ${USERID}
--log-level INFO
--log-file ${HOMEDIR}/logs/rclone.log
--timeout 1h
--tpslimit 10
--tpslimit-burst 10
--uid ${GROUPID}
--umask 002
--user-agent soopahfly
--rc
--rc-pass ${RCLONEPASSWORD}
--rc-user ${RCLONEUSERNAME}
--config ${HOMEDIR}/.config/rclone/rclone.conf
${RCLONESERVICE}:${RCLONEFOLDER} ${RCLONEMOUNT}
ExecStop=/bin/fusermount -uz ${RCLONEMOUNT}
ExecStop=/bin/rmdir ${RCLONEMOUNT}
Restart=always

[Install]
WantedBy=default.target unionfs.service mergerfs.service

Can anyone see anything to improve what I've got going on here?
I'm in the process of rebuilding my Plex server since the hardware died in the last one. I don't have any records of the config I was using before but it was working flawlessly. I never hit any limits whatsoever.

I think it's hitting the 750gb upload limit as no-one is downloading.
I had added the stop_on_upload_limit = true to my config file, but it still doesn't seem to stop this happening.
Looking at my developers console, there's not a tonne of API requests, but I can't see where the number of uploads/downloads would be.

Here's a small snippet of my log file - 2021/09/15 09:29:42 INFO : Starting transaction limiter: max 10 transactions/s - Pastebin.com
The bit where it says "Can't open for write without O_TRUNC on existing file without --vfs-cache-mode >= writes" If I add --vfs-cache-mode >= writes to my rclonefs.service file, rclone won't mount.

Any ideas?

hello and welcome to the forum,

in the log, there are no entries about Google Drive states bandwidth limit has been reached.
need to see the exact entry in a rclone debug log file.
change --log-level INFO to --log-level DEBUG so we can see the full debug log...

the correct syntax is --vfs-cache-mode writes tho if you are using the mount for streaming media, might want to use --vfs-cache-mode full

for an example of a well tested systemd file using for streaming over gdrive using plex, written by fellow rcloner, @Animosity022
https://github.com/animosity22/homescripts/blob/master/systemd/rclone.service

I will change that and see what happens to the logs.
I have the issue at the moment that I've changed something in the service file and now it won't mount. But rclone lsd shows files in my drive.

Changed to debug, implemented the VFS stuff and this is what I get now trying to play :

2021/09/15 22:37:13 INFO : Media/tv/Wheeler Dealers/Season 17/Wheeler Dealers - S17E02 - TVR Griffith WEBDL-1080p.mkv: vfs cache: downloader: error count now 10: vfs reader: failed to write to cache file: open file failed: googleapi: Error 403: The download quota for this file has been exceeded., downloadQuotaExceeded
2021/09/15 22:37:13 ERROR : Media/tv/Wheeler Dealers/Season 17/Wheeler Dealers - S17E02 - TVR Griffith WEBDL-1080p.mkv: vfs cache: failed to download: vfs reader: failed to write to cache file: open file failed: googleapi: Error 403: The download quota for this file has been exceeded., downloadQuotaExceeded

is that a file that is shared with others, as that is often the reason for that message.
to many users trying to access the same file over and over again within a time period.

nothing rclone can do about that, just have to wait until that quota is reset.
not exactly sure how long you have to wait, up to 24 hours.

that error message is not about bandwidth.

that error message is about download not upload

i suggest that you disable these settings

Enable Thumbnail previews: This creates a full read of the file to generate the preview and is set per library that is setup

Perform extensive media analysis during maintenance : This is listed under Scheduled Tasks and does a full download of files and is ony used for bandwidth analysis when streaming.

I think the Thumbnail Previews is the key here, I'd disabled it on all libraries except TV. Must have missed it.
There are no shares to the google drive, only API to rclone.

I've disabled it now, and will see what happens.

The error from my original post was from memory, and also what happens if you try and download a file direct from GD.

This happens even if the file is not shared with anyone, and never used at all. I'm getting the same message trying to restore my 50 TB backup from google drive.

The files were just cold storage. Never accessed at all, and when I get my download quota of the entire teamdrive I get this with all files too...

Seems there is a total day download limit per teamdrive now?

not an expert with gdrive and many quotas and quirks.
as i understand it, if you hit a total download limit, that would be a different error message, as per
https://rclone.org/drive/#drive-stop-on-download-limit

whereas in your case, the error is per file, not per account
The download quota for this file has been exceeded

just noticed that you are also posting about the same issue at
https://forum.rclone.org/t/google-drive-flag-to-stop-on-download-limit/26691

as @Animosity022 knows all about these things, best to post there, not here...

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