Coolbule 12 Posted December 4, 2025 Posted December 4, 2025 So recently my emby server has been running very slow. Recently watched isn't loading and sometimes even the libraries won't load. I checked my db file and it was 66GB. I ran the vacuum last night and it went to 55. So i re-created it today and its now at 29GB. I upgraded my server from 32GB to 64Gb of ram and Emby is still trying to take 14GB+ without any streaming happening. I realized all this because I went to increase my database cache size and there was a post saying 1.5-2x the library.db size, but 120GB of cache isn't possible. My library size is ~1200 movies and 15.4k episodes. Does that db filesize seem correct? If not what log files would you need to look at to help with me solve this issue? Server Specs: Ryzen 9 5900X 64GB DDR4 Ram 2x 3080 1x3090 2.5gbps network connection to nas with movie/TV show data
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 Attached log file here embyserver.txt
Happy2Play 9780 Posted December 4, 2025 Posted December 4, 2025 The old method of 1.5 to 2x the db size is obsolete as now there are multiple db connections. So in your case 5 connections x 2GB cache size just for the library.db. You need to reset your library cache to default 128.
Happy2Play 9780 Posted December 4, 2025 Posted December 4, 2025 2 hours ago, Coolbule said: I checked my db file and it was 66GB. My library size is ~1200 movies and 15.4k episodes. Does that db filesize seem correct? With those numbers no. As I have about 7000+ movies and over 50,000 episodes and my library.db is only about 485MB. 1
Lessaj 467 Posted December 4, 2025 Posted December 4, 2025 Your DB seems massive to me, I don't even think it should end up being that large. My DB is only 559 MB with twice as many movies, 3x as many episodes, and 20k songs. What do you mean by recreated it? What did you do? 1
Neminem 1518 Posted December 4, 2025 Posted December 4, 2025 Hmm how many extras do you have in your library?
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 (edited) 16 minutes ago, Lessaj said: Your DB seems massive to me, I don't even think it should end up being that large. My DB is only 559 MB with twice as many movies, 3x as many episodes, and 20k songs. What do you mean by recreated it? What did you do? I deleted the library.db and re-created the libraries on emby server I also don't have many extras Edited December 4, 2025 by Coolbule 1
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 13 minutes ago, Happy2Play said: Are you sure it is GB and not MB? Unfortunately I did double check my commas
Neminem 1518 Posted December 4, 2025 Posted December 4, 2025 Hmm what is corrupting your db? Guess we need logs from recreating your library.db to see that's going on. Is your db drive showing smart errors?
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 1 minute ago, Neminem said: Hmm what is corrupting your db? Guess we need logs from recreating your library.db to see that's going on. Is your db drive showing smart errors? so i saw in the docs somewhere to get emby to recreate just rename is .corrupt, so that's what i did, it didn't do that itself. Do you know which logfile would show the recreating the db? Its on a windows server and crystal disk shows 0 errors atleast for the drive emby server is on
Happy2Play 9780 Posted December 4, 2025 Posted December 4, 2025 Yes the KB mentions renaming. As for log it would be when you renamed the db and started Emby again to scan all your content. But if you only have the content numbers listed there is something way off with the db.
Happy2Play 9780 Posted December 4, 2025 Posted December 4, 2025 (edited) But per your recreation log you have 5 libraries. Line 494: 2025-12-04 04:28:53.699 Info App: Creating folder in database Movies - Z:\Movies Line 1554: 2025-12-04 04:30:17.441 Info App: Creating folder in database TV Shows - Z:\TV Shows Line 2173: 2025-12-04 04:31:19.046 Info App: Creating folder in database Recordings - Z:\Recordings Line 2980: 2025-12-04 04:32:40.075 Info App: Creating folder in database Audio Books - Z:\Audio Books Line 5209: 2025-12-04 04:34:46.395 Info App: Creating folder in database Family Videos - Z:\Family Videos So anything is possible per your content but still think that is extreme for library.db especially for a recreation as I can sort of understand a really old db that has ben migrated having obsolete tables. Edited December 4, 2025 by Happy2Play
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 (edited) 10 minutes ago, Happy2Play said: Yes the KB mentions renaming. As for log it would be when you renamed the db and started Emby again to scan all your content. But if you only have the content numbers listed there is something way off with the db. This morning around 6 in that log above should be in the middle of that first scan Edit: right after i renamed the .corrupt file is when i started creating and re-scanning the new libraries, which would be the start of the log file above. Edited December 4, 2025 by Coolbule
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 41 minutes ago, Happy2Play said: But per your recreation log you have 5 libraries. Line 494: 2025-12-04 04:28:53.699 Info App: Creating folder in database Movies - Z:\Movies Line 1554: 2025-12-04 04:30:17.441 Info App: Creating folder in database TV Shows - Z:\TV Shows Line 2173: 2025-12-04 04:31:19.046 Info App: Creating folder in database Recordings - Z:\Recordings Line 2980: 2025-12-04 04:32:40.075 Info App: Creating folder in database Audio Books - Z:\Audio Books Line 5209: 2025-12-04 04:34:46.395 Info App: Creating folder in database Family Videos - Z:\Family Videos So anything is possible per your content but still think that is extreme for library.db especially for a recreation as I can sort of understand a really old db that has ben migrated having obsolete tables. i have about 50TB total of movies/tv shows/etc mostly non-compressed straight rips. Then creating the new db today should have fixed that old stuff right?
Luke 42077 Posted December 4, 2025 Posted December 4, 2025 Quote but 120GB of cache isn't possible. You basically would just do as much as you're willing to allocate.
Coolbule 12 Posted December 4, 2025 Author Posted December 4, 2025 1 minute ago, Luke said: You basically would just do as much as you're willing to allocate. the biggest problem is my whole server has been slowing down because of this basically to a crawl where the libraries don't even load for a couple minutes. But it does seem like that file is too large for the amount of content I have?
Lessaj 467 Posted December 5, 2025 Posted December 5, 2025 I'm wondering if you delete all your libraries how large the DB file would be at that point since it should be basically empty? I believe there are a few settings that get stored there, and then without any content in libraries there might be people information leftover but again I can't imagine 40+ GB of metadata for people being stored in the DB. I looked briefly at your log file and I think your organization and renaming of files could use some work, but that still shouldn't cause the library file to be that large, you simply don't have enough content for that. The size of the content is irrelevant it's going to come down to number of items to store data for, and we've shown that our libraries with double to triple the number of items are minuscule by comparison.
pgriffith 88 Posted December 5, 2025 Posted December 5, 2025 Just another reference point, from a fresh install of 4.9.1.x (ie not upgraded from a previous installation, started from scratch) 5400 movies, 32,500 tv eps and 31,800 music files Library.db is 386MB
Coolbule 12 Posted December 5, 2025 Author Posted December 5, 2025 (edited) 35 minutes ago, Lessaj said: I'm wondering if you delete all your libraries how large the DB file would be at that point since it should be basically empty? I believe there are a few settings that get stored there, and then without any content in libraries there might be people information leftover but again I can't imagine 40+ GB of metadata for people being stored in the DB. I looked briefly at your log file and I think your organization and renaming of files could use some work, but that still shouldn't cause the library file to be that large, you simply don't have enough content for that. The size of the content is irrelevant it's going to come down to number of items to store data for, and we've shown that our libraries with double to triple the number of items are minuscule by comparison. I can try that, should i delete/.corrupt my current db then just restart emby or just remove the libraries and see what happens? I'm not against re-installing the whole emby server stuff again....I just also want to make sure this doesn't continue to happen Edited December 5, 2025 by Coolbule
Lessaj 467 Posted December 5, 2025 Posted December 5, 2025 I think it would be best to do in stages. Take note of the current size, delete one library, check the size, repeat. May take some time to actually delete the content from the DB and may also be a good idea to run a library scan inbetween each deletion as well, so make sure to check the log file. This may help to narrow down a particular offender library, and also keeps the people in the DB so when everything is gone content wise there should be little that remains. If it is still very large after everything has been removed you can try to use a DB browser to see what tables are large and what content may be left in them. If you end up going with another library.db rebuild after all this, a similar approach should be taken. Note the size when you started, which should be basically empty since it's "fresh", then add one library at a time and wait for it to completely finish scanning before adding another one, taking note of the size each time.
Coolbule 12 Posted December 5, 2025 Author Posted December 5, 2025 1 hour ago, Lessaj said: I think it would be best to do in stages. Take note of the current size, delete one library, check the size, repeat. May take some time to actually delete the content from the DB and may also be a good idea to run a library scan inbetween each deletion as well, so make sure to check the log file. This may help to narrow down a particular offender library, and also keeps the people in the DB so when everything is gone content wise there should be little that remains. If it is still very large after everything has been removed you can try to use a DB browser to see what tables are large and what content may be left in them. If you end up going with another library.db rebuild after all this, a similar approach should be taken. Note the size when you started, which should be basically empty since it's "fresh", then add one library at a time and wait for it to completely finish scanning before adding another one, taking note of the size each time. I'm still going through each one now....but when i went to delete the "TV Shows" is hung quite a bit and i had to restart the server to fully remove it (it removed the path, but not the library)
Lessaj 467 Posted December 5, 2025 Posted December 5, 2025 Yes that's a big library with a lot of items, I would expect that to take a while. You may have interrupted it essentially but a scan library task might clean out any remaining paths.
Coolbule 12 Posted December 5, 2025 Author Posted December 5, 2025 (edited) When you were talking about my file naming scheme, could you explain more on that? Is it just the extra letter folders mostly? Edited December 5, 2025 by Coolbule
Coolbule 12 Posted December 5, 2025 Author Posted December 5, 2025 1 hour ago, Lessaj said: Yes that's a big library with a lot of items, I would expect that to take a while. You may have interrupted it essentially but a scan library task might clean out any remaining paths. Alright with everything gone I still had 15GB left. I got into the DB Browser and here's my row counts for the tables left. Do you happen to know anything about fts_serach9_data or UserDataKeys2? Those seem to atleast be part of the problem
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now