Plex not adding or removing files

Server Version#: 1.41.5.9522-a96edc606-ls259 (Unraid Docker)
Player Version#: Web browser

Dear Plex community

I have a weird issue since two days. Suddenly Plex stopped adding new episodes to my TV Show library. I tried the Plex Dance, but realised that it does also not remove any files.

If I remove files it will just say unavailable but not play it.

If I create a new library and add the same folders everything appears.

It seems that one library is bugged.

File naming and permissions are the same and since adding them in a new library seems to work.

I would appreciate any help.

BR
Alwin

I may try deleting the database and recovering from an old one.

Best regards

How many directories do you have indexed ?

On Linux, depending on kernel, the default limit is 65536 directories which can be monitored (kernel inotify service).

PMS uses the inotify service to automatically detect changes.

If you’ve exceeded the host’s table size then you need to increase the table.
Rebuilding PMS won’t buy you anything

Without seeing logs, you might also have a damaged DB.

1 Like

Hahaha no around 400 directories (TV Shows) and 1738 folders in total (according to windows porperties).

Looking at my logs, it does seem that the DB is corrupted:

I will try and restore one from an older version. Is there any version to fix a corrupted one or is restoring the best option?

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

I would follow this guide? Or is there an easier one?

Thanks!

BR

Funnily enough the DB backup is also quite old, eventhough backup every three days is enabled in the settings.

I have a tool which can repair certain DB problems.

It might be able to help.

It can’t repair those cases where the data in the fields is damaged (it’s not PMS).
It can remove damaged records so PMS can rebuild them.

Given PMS backups are old, that tells us when the DB became damaged.
(PMS cannot backup a damaged DB)

Consider this .
It can also make replacing the DB easier.

Thanks!

I recovered the old 2025-01-15 (I assumed the 18 may be corrupted) and rescanned all the libraries. It is finding them all again.

Should I rerun the repair utility then on the fixed DB just to see if there are any issues? Using the automatic mode?

After it’s all done, running Auto will put the DBs in pristine order
(tables resequenced and indexes rebuilt)

You’ll immediately spot pages load quicker and search is way faster

Damn you were a massive help!

Thanks a lot <3

Its the second time in a year it has corrupted. It is weird. I have duplicity (backup) running daily, so worst case I can also recover it another way, but I need to check if I can setup an alert, when the backups are not being created anymore, or run your utility every few months.
Would that cause any issues?

Part of that corruption detection (and fixing) is why I wrote the script.

It can run daily (cron job with command line arguments).
The exit status will tell you if it’s failed and couldn’t recover successfully
That would be the trigger to send yourself notification.

Otherwise, you have a daily/weekly/monthly automatic check & optimize of the DBs

Consider:

./DBRepair.sh   stop auto start exit
Result=$?
[ $Result -ne 0 ] &&  Do Something Here   passing $Result.

You might want to look at the README.md file. I’ve got some documentation there (yes, I should write more. haha)

1 Like

The bane of every developer :smiley:

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