I believe I’ve been having a similar issue with my Plex installation:
Mine doesn’t come back automatically after time though. I’ve left a putty session open running top so that I can see what the resource usage looks like when it happens, and it always shows plex using 90%+ of memory which causes kswapd to start spiking the CPU, causing the whole system to slow down to a crawl. I’ve been trying to figure out whats been causing this for about a week now on my own, but I really haven’t seen anything.
I tried running that sqlite command and got the following:
root@valhalla:/plex/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases# echo ‘select count(metadata_item_id),metadata_item_id from metadata_relations group by metadata_item_id order by count(metadata_item_id) desc limit 20’ | sqlite3 com.plexapp.plug-ins.library.db
Error: near line 1: no such table: metadata_relations
I’m running Server Version 1.25.2.5319 on Ubuntu 18.04.6.