Mount Crashing Plex


#1

Hey!

My mount keeps crashing reporting this:
2019/02/12 18:11:12 ERROR : Video/Series/How I Met Your Mother/Season 4/How I Met Your Mother S04E01.mp4: unexpected conditions during reading. current position: 296722432, current chunk position: 293601280, current chunk size: 1929216, offset: 3121152, chunk size: 10M, file size: 1004514697
2019/02/12 18:11:12 ERROR : Video/Series/How I Met Your Mother/Season 4/How I Met Your Mother S04E01.mp4: ReadFileHandle.Read error: low level retry 1/10: EOF
fatal error: runtime: out of memory

I am running a VPS just dedicated to PLEX, with 20 gb’s of SSD, 2 gb of memory and 1 processor of at least 2 ghz [OVH].

My rclone.conf file looks like this:
[OneDrive]
type = onedrive
token = Hidden
drive_id = Hidden
drive_type = business
use_trash = false
chunk_size = 10M

[O-Cache]
type = cache
remote = OneDrive:
plex_url = http://localhost:32400
plex_username =
plex_password =
chunk_size = 10M
db_path = /home/Support/o-cache
chunk_path = /home/Support/o-cache
info_age = 2h
chunk_total_size = 10G
db_purge = true

The mountingsettings are as follows:
rclone -v --log-file /home/Support/Logs/LogOneDrive.log
mount O-Cache:/ /mnt/OneDrive
–rc
–allow-other
–buffer-size 512M
–max-read-ahead 512M
–gid=1000
–uid=1000
–dir-cache-time 2h
–fast-list
–onedrive-chunk-size 10M
–cache-chunk-path=/home/Support/o-cache2
–cache-db-path=/home/Support/o-cache2
–vfs-read-chunk-size 64M
–vfs-read-chunk-size-limit 50G
–umask 002

Does anyone have any suggestions on troubleshooting? I am kind of stuck now… Would be highly appreciated! Thanks!


#2

You are running out of memory as you are opening 512M per file.

Few other things:

–fast-list does nothing on mounts
–max-read-ahead 512M does nothing unless you have a custom compiled kernel.

If you are using the cache backend, you should set your buffer size to 0M as it does its own thing. A chunk size of 10M is super tiny too. You should set that to 32M or 64M.


#3

Much appreciated for writing such a quick and informative reply! I’ll update my settings and give it another try.


#4

Tweaked everything as you described and troubleshooted for a while but I still get the ‘runtime: out of memory’…

  • Removed buffer-size flag
  • Removed fast-list flag
  • Removed max-read-ahead flag
  • Cleared cache files

Even removed:
–onedrive-chunk-size 30M

Also tried what happened while editing chunk size in both the rclone.conf and the mount. Any suggestions maybe?

Current Setup:
[OneDrive]
type = onedrive
token =
drive_id =
drive_type = business
use_trash = false
chunk_size = 30M

[O-Cache]
type = cache
remote = OneDrive:
plex_url = http://localhost:32400
plex_username =
plex_password =
chunk_size = 30M
db_path = /home/Support/o-cache
chunk_path = /home/Support/o-cache
info_age = 2h
chunk_total_size = 10G
db_purge = true

Mount:
rclone -v --log-file /home/Support/Logs/LogOneDrive.log
mount O-Cache:/ /mnt/OneDrive
–rc
–allow-other
–gid=1000
–uid=1000
–dir-cache-time 2h
–cache-chunk-path=/home/Support/o-cache2
–cache-db-path=/home/Support/o-cache2
–vfs-read-chunk-size 60M
–vfs-read-chunk-size-limit 50G
–umask 002


#5

Yeah, you missed setting the --buffer-size 0M.


#6

Thanks, however this didn’t help either.

Seems to be crashing all the time now. Worked yesterday but seems to be crashing now with those settings as well. Looks as if maybe something else ‘broke’ although I was only configuring rclone… Lol

I’ll just try to run it without the cache, to see if that works.


#7

Nah, you only have 2GB of memory and that’s pretty slim for Plex + rClone.

If you are seeing out of memory errors, you might need to add some swap or get more memory.


#8

Might be so but I would expect it to slow down instead of crash? Or is that a strange thought?


#9

Unfortunately, running out of memory is that.

You could also try to set --cache-chunk-no-memory to see if that helps too. It would slow it down, but if you are memory limited, you’d gotta sacrifice some speed.

What else is running on it besides Plex and rClone?


#10

Nothing. And it is not transcoding [direct stream]

Thanks for helping me troubleshoot btw. Much appreciated!


#11

Just went back to previous config and everything seems stable. Maybe flag --use-mmap could have helped btw?


#12

It could, but plex does tend to open a lot of files so you really need to make sure there isn’t any memory use for files.