CaseyP 17 Posted October 26, 2025 Posted October 26, 2025 Since 4.8 I've been able to create a reproduceable memory leak. Emby runs on a server that I administer from a separate computer on the same network. Using that separate computer, if I leave the server dashboard open in a browser/tab for a period of time (example 8 hours) the server will have a memory leak and max out the available ram. Visually, on the dashboard in the browser, when the tab/page is brought to focus, I'll see all the "Now Playing" section quickly "fast forward" through everything that was played by all users. The memory leak doesn't go away, and a server restart is required. I have not tried leaving the dashboard open in other browsers to test. The browser I'm using is Edge (chromium based) I can install and try a different browser tomorrow and see if I get the same results. embyserver-63897033055.txt
Luke 42077 Posted October 26, 2025 Posted October 26, 2025 Hi, please try removing these plugins: Bulky 1.0.20.0 Chapter API 1.4.0.0 Episode Refresh 1.0.0.1 Media Info 1.0.1.20 Samsung Smart Things 1.0.0.4 TimeLordMovies 19.8.3.1105 Then restart the server and see how things compare. Thanks.
CaseyP 17 Posted October 26, 2025 Author Posted October 26, 2025 Uninstalled those plugins. Still had a memory leak with emby using 32gb of ram after 8 hours. It hadn't fully saturated the ram, but I given the sever usually uses 2-4gb, it would appear it would've eventually filled up the rest. Test was done by having a client play a show, on shuffle, non-stop, while the server dashboard was left open on a computer, checking the server dashboard tab after 8 hours produces the similar results where the now playing displayed each episode in rapid succession before catching up to real time of what was playing. embyserver-63897093242.txt
Happy2Play 9780 Posted October 26, 2025 Posted October 26, 2025 (edited) 17 hours ago, CaseyP said: Visually, on the dashboard in the browser, when the tab/page is brought to focus, I'll see all the "Now Playing" section quickly "fast forward" through everything that was played by all users. I have seen this but have never used up all memory and currently setting at 465MB with a user watching. Is this local or remote connection but will test leaving dashboard open on local system for 24 hours as I am sitting at 465MB with one current user. @Luke@sa2000should OP change to 5 dbconnections? 2025-10-26 08:44:15.738 Info SqliteItemRepository: Initializing PooledDatabaseConnectionManager with pool size: 20 2025-10-26 08:44:15.738 Info AuthenticationRepository: Initializing PooledDatabaseConnectionManager with pool size: 5 2025-10-26 08:44:15.753 Info ActivityRepository: Initializing PooledDatabaseConnectionManager with pool size: 3 As it looks like 9 connections were closed on shutdown so about 45Gb per db cache size (cache_size=-5242880). If I am reading this correctly. Edited October 26, 2025 by Happy2Play
CaseyP 17 Posted October 26, 2025 Author Posted October 26, 2025 5 minutes ago, Happy2Play said: I have seen this but have never used up all memory and currently setting at 465MB with a user watching. Is this local or remote connection but will test leaving dashboard open on local system for 24 hours as I am sitting at 465MB with one current user. @Luke@sa2000should OP change to 5 dbconnections? 2025-10-26 08:44:15.738 Info SqliteItemRepository: Initializing PooledDatabaseConnectionManager with pool size: 20 2025-10-26 08:44:15.738 Info AuthenticationRepository: Initializing PooledDatabaseConnectionManager with pool size: 5 2025-10-26 08:44:15.753 Info ActivityRepository: Initializing PooledDatabaseConnectionManager with pool size: 3 As it looks like 9 connections were closed on shutdown so about 45Gb per db cache size (cache_size=-5242880). If I am reading this correctly. Everything is local (Server is a headless windows 11 machine. Clients are all local, mostly nvidia shields. Test above was done via a second computer on the network running Emby Theater. The second computer is also what is keeping the server dashboard open via edge) If I remember to close the server dashboard on the second computer, Emby can/does go weeks without chewing through the ram/needing a restart.
Happy2Play 9780 Posted October 26, 2025 Posted October 26, 2025 @CaseyPIs that correct you have the Database cache set to 5Gb? As the new multiple db connections now is eating up more ram.
CaseyP 17 Posted October 26, 2025 Author Posted October 26, 2025 31 minutes ago, Happy2Play said: @CaseyPIs that correct you have the Database cache set to 5Gb? As the new multiple db connections now is eating up more ram. Yes, DB cache is configured to 5gb. My library.db file is 1.5gb so I wanted to make sure there was enough room for... everything
Happy2Play 9780 Posted October 26, 2025 Posted October 26, 2025 (edited) 38 minutes ago, CaseyP said: Yes, DB cache is configured to 5gb. My library.db file is 1.5gb so I wanted to make sure there was enough room for... everything Yes but now per new connections you could end up with 20x the db cache. Depending on the upgrade cycle you came from as most will should be 5 not 20. So the old way prior to 4.9 think will have negative effects on the new way. So their needs to be new information published. Edited October 26, 2025 by Happy2Play
CaseyP 17 Posted October 26, 2025 Author Posted October 26, 2025 14 minutes ago, Happy2Play said: Yes but now per new connections you could end up with 20x the db cache. Depending on the upgrade cycle you came from as most will should be 5 not 20. So the old way prior to 4.9 think will have negative effects on the new way. So their needs to be new information published. I was on beta until 4.1.9.80 and jumped back to stable. Do we have any idea as to a sweet spot for the DB Cache? Or is that the new information that needs to be worked out/published.
Happy2Play 9780 Posted October 26, 2025 Posted October 26, 2025 6 minutes ago, CaseyP said: I was on beta until 4.1.9.80 and jumped back to stable. Do we have any idea as to a sweet spot for the DB Cache? Or is that the new information that needs to be worked out/published. I tagged the two individual that should be able to answer this better as I have already asked the same question as I don't think the 1.5 to 2 times the db applies any more. At the same time I am just guessing here also as it could be something different.
Happy2Play 9780 Posted October 27, 2025 Posted October 27, 2025 (edited) A follow up as I replicated this sort of as when I returned to the open tab on dashboard and looked at task manager it hit about 18Gb At the same time as soon as the dashboard caught up memory returned to normalish as it was still in use. So it would appear the browser tabbed dashboard is caching its entire operation in a somewhat suspended state until one looks at the open tab again. Or at least the best way to describe it. @Luke Steps I took to reproduce Open browser on localhost open tab to dashboard have client/s connect and play something then open another tab to anywhere and leave it there what a few hours and you should see the memory usage increase return to dashboard tab and see session basically in fast forward and dashboard normalizes with sessions stopping and ram usage lowering. At least in my quick and dirty test. In the end there is something with the Dashboard operations/Now Play and being tabbed that appears to be a cause. Edited October 27, 2025 by Happy2Play 1 1
Clackdor 109 Posted October 27, 2025 Posted October 27, 2025 20 minutes ago, Happy2Play said: So it would appear the browser tabbed dashboard is caching its entire operation in a somewhat suspended state until one looks at the open tab again. Or at least the best way to describe it. I have noticed a very odd occurance on my server where if I leave the browser open on my server and just close the rdp connection rather than fully signing off, when I sign back in I see a bunch of activity speeding by as if it's replaying sessions very quickly. Also, on a brand new beta install, my memory usage had ballooned to 32GB after scanning libraries. After restarting it has leveled back out, but it also isn't doing anything ATM either.
Happy2Play 9780 Posted October 27, 2025 Posted October 27, 2025 This only happens with the open browser on dashboard correct? But don't believe this behavior is actually new as I have seen this dashboard in fast forward for quite a while if I happen to be on that tab and return later even on remote connections but have never gone to the server/host and checked memory usage until now.
Clackdor 109 Posted October 27, 2025 Posted October 27, 2025 3 hours ago, Happy2Play said: This only happens with the open browser on dashboard correct? But don't believe this behavior is actually new as I have seen this dashboard in fast forward for quite a while if I happen to be on that tab and return later even on remote connections but have never gone to the server/host and checked memory usage until now. Correct. If there is no browser open then opening the browser and going to the dashboard is normal. I haven't seen RAM usage spike like that again (yet). RAM uage by each emby instance definitely seems heavier than what it should be though.
sa2000 674 Posted October 27, 2025 Posted October 27, 2025 17 hours ago, Happy2Play said: As it looks like 9 connections were closed on shutdown so about 45Gb per db cache size (cache_size=-5242880). If I am reading this correctly Now that we have multiple connections, I would suggest a much lower value for the cache - how about trying 512Mb 17 hours ago, Happy2Play said: should OP change to 5 dbconnections Well, since a brand new 4.9.1.xx install would be set to 5. I would recommend doing that. Shutting down Emby Server and then editing the config\system.xml file to change the line to have value of 5 instead of 20 <MaxLibraryDbConnections>5</MaxLibraryDbConnections> 1
sa2000 674 Posted October 27, 2025 Posted October 27, 2025 7 hours ago, Happy2Play said: I replicated this sort of as when I returned to the open tab on dashboard and looked at task manager it hit about 18Gb Thanks. I will follow this up 1
Neminem 1518 Posted October 27, 2025 Posted October 27, 2025 I wonder if this workaround fixes the Emby / Edge issue when sleeping. Enable, Disable Sleeping Tabs; Automatically suspend tabs in Edge But then again why should we have to do this 1
sa2000 674 Posted October 28, 2025 Posted October 28, 2025 19 hours ago, Neminem said: wonder if this workaround fixes the Emby / Edge issue when sleeping. Enable, Disable Sleeping Tabs; Automatically suspend tabs in Edge @Happy2PlayWhat do you have this set on your Microsoft Edge "edge://settings/system" setting For me it appears to be set to "Save resources with sleeping tabs" I am asking because with 3 clients playing media I have only got to 1.4Gb committed memory
Happy2Play 9780 Posted October 28, 2025 Posted October 28, 2025 (edited) 1 hour ago, sa2000 said: @Happy2PlayWhat do you have this set on your Microsoft Edge "edge://settings/system" setting For me it appears to be set to "Save resources with sleeping tabs" I am asking because with 3 clients playing media I have only got to 1.4Gb committed memory It appear to be set but per the last test I would say it did not work. 2025-10-28 05:19:11.013 Info SqliteUserRepository: Initializing PooledDatabaseConnectionManager with pool size: 3 2025-10-28 05:19:11.041 Info SqliteItemRepository: Initializing PooledDatabaseConnectionManager with pool size: 5 2025-10-28 05:19:11.043 Info AuthenticationRepository: Initializing PooledDatabaseConnectionManager with pool size: 5 2025-10-28 05:19:11.102 Info ActivityRepository: Initializing PooledDatabaseConnectionManager with pool size: 3 2025-10-28 05:19:14.659 Info SqliteItemRepository: Init Complete 2025-10-28 05:19:14.661 Info SqliteItemRepository: Opening sqlite connection to A:\Emby-Server\data\library.db. isReadOnly: True 2025-10-28 05:19:14.662 Info SqliteItemRepository: PRAGMA mmap_size=2147418112 2025-10-28 05:19:14.662 Info SqliteItemRepository: PRAGMA cache_size=-1048576 2025-10-28 05:19:14.662 Info SqliteItemRepository: PRAGMA page_size=4096 Edited October 28, 2025 by Happy2Play 1
sa2000 674 Posted October 28, 2025 Posted October 28, 2025 (edited) On 28/10/2025 at 12:23, Happy2Play said: t appear to be set but per the last test I would say it did not work. I can't get it to fail - It seems to remain active. I see in wireshark it is sending periodic requests for activitylog even though it is tabbed and not being displayed I can see what potentially the issue would be - emby server is sending a websocket packet every 1 to 2 seconds and the more sessions the bigger the packet - but for me they are being read by Edge - i have even reduced idle detection to 5 minutes and restarted edge For me it is remaining active as a tabbed browser session Any thoughts how I would make it go dormant ? Edited October 29, 2025 by sa2000
sa2000 674 Posted October 30, 2025 Posted October 30, 2025 @Happy2PlayI have managed to get it to happen - with 2 laptops instead of loopback for the dashboard and also i made one other change for Windows System settings for Multi-tasking to have "Show tabs from apps when snapping ot pressing Alt+Tab" to "Don't show tabs"
sa2000 674 Posted October 31, 2025 Posted October 31, 2025 @CaseyP @Happy2Play This has now been referred to the development team The issue does appear to be related to the notifications through websockets for the "Now Playing" sessions and it does appear that transcoded playback has much larger payload in these websocket notifications Until this is addressed, my advice would be to have the MS Edge setting for System/Performance "Put inactive tabs to sleep after a specified amount of time" set to a high value edge://settings/system/managePerformance On 27/10/2025 at 08:03, Clackdor said: I have noticed a very odd occurance on my server where if I leave the browser open on my server and just close the rdp connection rather than fully signing off, when I sign back in I see a bunch of activity speeding by as if it's replaying sessions very quickly. Also, on a brand new beta install, my memory usage had ballooned to 32GB after scanning libraries. After restarting it has leveled back out, but it also isn't doing anything ATM either. Is this using Microsoft Edge ? Or reproducible with Google chrome as well. If it is, please let me know the steps to go through to reproduce Thanks 1
Clackdor 109 Posted October 31, 2025 Posted October 31, 2025 36 minutes ago, sa2000 said: Is this using Microsoft Edge ? Or reproducible with Google chrome as well. If it is, please let me know the steps to go through to reproduce Emby is running bare-metal on windows server 2022, and yes this is with edge. I leave the desktop session signed in with edge open with the emby dashboard. Closing RDP or letting the session lock itself results in the odd behavior i noted when signing back in. As for the high memory usage, I haven't seen that beta instance or my other installs on the same server get anywhere close to that usage again. 1
PixelWizard 7 Posted November 3, 2025 Posted November 3, 2025 (edited) I have more than 5 emby servers on 4.9.1.80 and all of them have problems with ram memory... i use Fedora and Ubuntu, I have Proxmox with emby servers with 16gb of ram. Before I used 4.8 and 4.9.1.10 and no have issue but now... is the hell. All of my servers run out of ram, laggy and unnusable and i dont know what more i can do. Not using plugins. First i think is machine problem, but i have 2 proxmox clusters, separetly in different places, different internet, different everything and on both my embys have problem with memory leaks, random stops and super laggy make servers unusable. Since 4.8 i used 16gb of ram and is enough, upgraded to 4.9.1.80 and start problems, i add more ram to my servers, 64gb ... same problem out of memory... my host have 256gb of ram bro, but emby never have enough I have exactly same issues in all my emby servers, start 1 week ago just when i upgrade them to 4.9.1.80. I attach a emby server log, but i think nothing interesting at all there. embyserver-63897724800.txt Edited November 3, 2025 by PixelWizard
sa2000 674 Posted November 3, 2025 Posted November 3, 2025 (edited) 7 hours ago, PixelWizard said: have more than 5 emby servers on 4.9.1.80 and all of them have problems with ram memory... i use Fedora and Ubuntu, I have Proxmox with emby servers with 16gb of ram. Before I used 4.8 and 4.9.1.10 and no have issue but now... is the hell. All of my servers run out of ram, laggy and unnusable and i dont know what more i can do. Not using plugins. First i think is machine problem, but i have 2 proxmox clusters, separetly in different places, different internet, different everything and on both my embys have problem with memory leaks, random stops and super laggy make servers unusable. Since 4.8 i used 16gb of ram and is enough, upgraded to 4.9.1.80 and start problems, i add more ram to my servers, 64gb ... same problem out of memory... my host have 256gb of ram bro, but emby never have enough I have exactly same issues in all my emby servers, start 1 week ago just when i upgrade them to 4.9.1.80. Thanks for the detail We are aware of memory use issues when scanning media libraries - more likely to occur when there are large libraries of TV / Music / Photos and the scanning of all libraries is scheduled to run through Scheduled Tasks - Most of these cases have been reported in this forum topic https://emby.media/community/index.php?/topic/142886-emby-ram-maxing-out/ - Until this is resolved, my advice would be to reduce the frequency of scheduled task "Scan Media Library" or disable it and rely on Library setting "Enable real monitoring" or do individual library scans/refreshes manually The other seen cause of high memory is the one reported in this forum topic relating to tabbed / suspended dashboard and the continuous Now Playing updates I suspect in your case, it is probably the library scans and you could enable debug logging and add logs to the forum topic I linked to confirm that it is to do with scanning. Logs provided would need to cover the period from launch until the time when the memory goes too high Edited November 3, 2025 by sa2000
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