Jellyfin Forum
database & file system cleanup issues - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: database & file system cleanup issues (/t-database-file-system-cleanup-issues)



database & file system cleanup issues - Tombar - 2024-01-13

Hi all,

first of all sorry if I missed anything in configuration. I am new to Jellyfin. Until now I used Kodi and Plex but really like to fully migrate to JellyFin.

Yesterday I added Movies / TV Shows and activated to display missing episodes. Today I now realized that I do not really want to have this as I quite often do not have all seasons. Mostly only the latest 1-2 seasons. Rest is already deleted.

I wanted to do a fresh start and fully deleted the created libraries.

  1. But why are the libraries still visible on the homepage even after the libraries got deleted? Yes they are empty now but still visible.

As I now have not a single media file anymore I was also curious if the data folder got cleansed.
  1. The "cache\temp" and "cache\images" folders still contain a significant amount of data. Should this not be deleted? Can I trigger the cleanup somewhere manually?
  2. The library.db is 53MB even without having any library configured?
  3. The "metadata\People" did not got cleaned at all. Why are all actors still listed despite not having anything within the library?
  4. "metadata\library" seemed to got cleansed but there are still several items left. I checked them and they are all poster.png files which show in most cases the title pictures of 3-4 different TV shows within one poster. Why is that still there? Can I somewhere trigger a cleanup?

I tried within the scheduled tasks area to run the database optimization etc. but this did not change anything.

I am asking all these questions because I like to understand the software I am using. In future I will add and delete a lot of TV Shows / episodes. My way of usage is that I watch episodes only once and then I delete them. If now always some data stays behind this is consuming unnecessary space and might slow down the whole application. I would prefer to have a clean system.

Thanks a lot for any hint.

Tommy


RE: database & file system cleanup issues - TheDreadPirate - 2024-01-13

If the library is EMPTY, but the library exists in Dashboard > Library, it will still be on the home screen.

Can you share a screenshot of what you are seeing? And a screenshot of Dashboard > Library?


RE: database & file system cleanup issues - Tombar - 2024-01-14

thank your for your tip, in the meanwhile fully deleted it and started from cratch.

But the other questions remain valid. Are there known issues/limitations with the cleanup process?


RE: database & file system cleanup issues - TheDreadPirate - 2024-01-14

As long as there aren't permission misconfigurations, I am not aware of any known cleanup issues.

If you still have your logs from before you started over, we can take a look at those to see if we can narrow down the cause of your problem.


RE: database & file system cleanup issues - toytown - 2024-01-15

So i just did a test as i was curious. My current config has

12K Movies
270 TV shows (ranging from 10eps to 1000eps, but mostly around 40 average)
8000 Home Photos

I don't have thumbnail extraction enabled and my library.db file is approx 515MB and the total space used by config/cache directories (not including transcodes) is 44GB.

I created a docker using exactly the same config/cache files (rsync'd) but pointing at empty media directories. I then ran a library scan and made sure that all the libraries were coming up completely blank. I ran the "People Scan" and every option in the maintenance tasks. I checked the log files to make sure that all the tasks had finished, then restarted the docker and did all the maintenance tasks again (i did this 3 times) also checking to make sure that Movies/TV Shows/Photos library were blank. Afterwards i checked the cache/config directories and surprisingly it was still using 31GB of space, so jellyfin does not appear to be cleaning itself up correctly.

The main directories were files were still held were
5.8GB in /config/metadata/People
23GB in /cache/images/resized-images


RE: database & file system cleanup issues - Tombar - 2024-01-16

do I understand it correctly that you current cache directory of an installation which you are using for quite a long time and where you had multiple changes (delete/add content) has 44GB and if you run a fresh scan it only has 23GB?

That would mean that Jellyfin has not correctly cleaned about 48% and a lot of space is wasted.


RE: database & file system cleanup issues - tmsrxzar - 2024-01-16

(2024-01-16, 06:32 PM)Tombar Wrote: do I understand it correctly that you current cache directory of an installation which you are using for quite a long time and where you had multiple changes (delete/add content) has 44GB and if you run a fresh scan it only has 23GB?

That would mean that Jellyfin has not correctly cleaned about 48% and a lot of space is wasted.

from the OP's description
12K Movies
270 TV shows (ranging from 10eps to 1000eps, but mostly around 40 average)
8000 Home Photos

i dont think it's unreasonable to have the size at 44GB, a library that size should be using well above 600000GB (600TB) in media storage which make the data side of things look tiny


RE: database & file system cleanup issues - toytown - 2024-01-17

Right the amount of data used isn't really a problem, the issue is that the problem the OP reported does indeed seem to be a bug. Whereby even after i deleted all my media and made sure that jellyfin had removed it from the libraries, there was still nearly 30GB of data not cleaned up. Overtime depending on how much content is deleted/added on a server it could mount up. Especially as a lot of people are using fast NVMe storage for their jellyfin directories/installs.