parrish 18 Posted July 18, 2017 Share Posted July 18, 2017 (edited) Has anyone else noticed a pretty bad memory leak in Emby Server on Windows? I've attached a screen shot of what I'm seeing. This happens after any media is played (in this case a movie was watched on Saturday evening then I noticed my server starting to lag a bit and saw (on Monday) that Emby was using over 5GB of RAM. No media had been played since that movie on Saturday evening. I first noticed this when it upgraded to 3.22.0 (I think that was the previous version). At that time I was having DLNA issues so I completely wiped out that isntallation and started fresh. I'm currently on 3.24.0 and the memory leak is still here. The only way to free the RAM is to stop the emby service. Then wait about 5 minutes or so and Emby Server will eventually free up the RAM and drop out of the Task Manager. At that time you can then restart the service. That said, I restarted the Emby service maybe 30 minutes ago and am already seeing RAM usage creeping up. No media has been played or accessed since then. It started at about 180mb of RAM and is now up to 480mb and slowly climbing. So maybe it's not directly related to if media has been streamed or not. Whatever the case, this is a pretty serious problem. Fortunately I have 64GB RAM on this server so it's not at a point where it's causing the entire server to fail- but likely would if it I let it go a week or more. Edit: this is a Server 2016 box. Edited July 18, 2017 by parrish 3 Link to comment Share on other sites More sharing options...
pir8radio 1289 Posted July 18, 2017 Share Posted July 18, 2017 (edited) How many tv channels (if any), how large is your library, and what plugins do you have installed? I would venture to say 5gig is not crazy If you have an unusual setup.... Here is what mine consumes over the last 30 days for reference. It ramps up as people surf your site, view images, and what not. I don't know the inner workings of emby, but I assume it caches some stuff in ram. Edited July 18, 2017 by pir8radio 1 Link to comment Share on other sites More sharing options...
parrish 18 Posted July 18, 2017 Author Share Posted July 18, 2017 Thanks pir8radio, No TV channels, no plugins, only one user (myself), and the library is pretty small- about 327GB in videos and 28GB in music. Link to comment Share on other sites More sharing options...
Untoten 295 Posted July 18, 2017 Share Posted July 18, 2017 I have to now reboot my server every 1-2 days due to the 16GB ram consumption by Emby, becoming quite the burden as it halts my ability to even RDP into the server to resolve this, sometimes causing hours or even days of downtime when I am out of state for a client. 2 Link to comment Share on other sites More sharing options...
TonkaTuff 6 Posted July 18, 2017 Share Posted July 18, 2017 (edited) Hi Emby team. I've been experiencing a problem recently with emby becoming unresponsive or very slow both from the web client and other clients, including MC Classic and Android TV. Looking at my task manager on my server when the problem is occurring, I can see that emby is using all available system memory. It seems like there may be a memory leak. I'm running emby Server Version 3.2.24.0 on a Windows Server 2012 R2 VM, using VMware workstation as the hypervisor. The host is also running Windows Server 2012 R2. I run emby server in 'Service mode'. The VM has 4GB RAM and 4 virtual cores configured. The VM host is not under under any load that would be constraining the VMs performance. For clients, I'm using the web client via Chrome, MC Classic, Android TV and Android. When the problem occurs, emby becomes very slow to load pages. I tried increasing the RAM allocation for the VM from 3GB to 4GB but this didn't help, emby just uses it all. The problem seems to take quite a while after the service is resarted to manifest itself. After a restart everything works normally at first. I've attached a server log covering a period during which the problem occurred. Please let me know if there's any other information I can provide to assist with troubleshooting this. Thanks for your help. TT server-63635932799.txt Edited July 18, 2017 by TonkaTuff Link to comment Share on other sites More sharing options...
Luke 36888 Posted July 18, 2017 Share Posted July 18, 2017 Hi, please remove all plugins except for backup and trailers. Thanks. Link to comment Share on other sites More sharing options...
TonkaTuff 6 Posted July 18, 2017 Share Posted July 18, 2017 Hi Luke. Uninstalled: CoverArt v4.0.36.0; Emby.Kodi Sync Queue v1.4.6362.2868; Rotten Tomatoes Reviews v3.0.6134.23469; Server WMC v1.0.0.82 Restarted emby server. Plugins still installed: Server Configuration Backup v1.0.1.15; Trailers v1.0.6399.530 I will monitor to see if the problem is still happening and report back. Thanks TT Link to comment Share on other sites More sharing options...
Luke 36888 Posted July 18, 2017 Share Posted July 18, 2017 Thanks for the feedback. Link to comment Share on other sites More sharing options...
parrish 18 Posted July 18, 2017 Author Share Posted July 18, 2017 I restarted the Emby server around 9pm last evening. It is now 1pm the next day. There was no usage of Emby at all during that time- no web page access, no media streaming, no new media added, etc. It went from consuming about 180mb of RAM at restart to now sitting at 1.38GB and growing. Link to comment Share on other sites More sharing options...
Luke 36888 Posted July 18, 2017 Share Posted July 18, 2017 Best thing to do is see how to report a problem. thanks ! Link to comment Share on other sites More sharing options...
Untoten 295 Posted July 18, 2017 Share Posted July 18, 2017 (edited) There is a clear memory leak.I enabled, allow anonymous usage reporting to hopefully help out with this kind of stuff a while ago, yet I am constantly asked for logs, does this actually do anything? I feel stupid at this point giving up my privacy for what seems like literally no purpose. Edited July 18, 2017 by Untoten 1 Link to comment Share on other sites More sharing options...
Untoten 295 Posted July 18, 2017 Share Posted July 18, 2017 This is honestly just completely ridiculous. Link to comment Share on other sites More sharing options...
Luke 36888 Posted July 18, 2017 Share Posted July 18, 2017 @@Untoten, please attach the information requested in how to report a problem. thanks ! Link to comment Share on other sites More sharing options...
ebr 14863 Posted July 18, 2017 Share Posted July 18, 2017 There is a clear memory leak. I enabled, allow anonymous usage reporting to hopefully help out with this kind of stuff a while ago, yet I am constantly asked for logs, does this actually do anything? I feel stupid at this point giving up my privacy for what seems like literally no purpose. That option allows us to track which apps are being used the most so we know which ones to concentrate on first with new features. It does not provide debugging information. Thanks. 1 Link to comment Share on other sites More sharing options...
Untoten 295 Posted July 18, 2017 Share Posted July 18, 2017 That option allows us to track which apps are being used the most so we know which ones to concentrate on first with new features. It does not provide debugging information. Thanks. Thank you for clarifying. Perhaps a something to consider including? Link to comment Share on other sites More sharing options...
lexisdude 130 Posted July 18, 2017 Share Posted July 18, 2017 (edited) For what its worth.I was having these type of problems. Extreme amounts of memory usage - system slowing down to a crawl; taking a very long time to load screens in the web browser and on my roku devices. Ended up being a corrupt or skewed database - even though I was not getting any database errors I was seeing timeouts because of the length of time it was taking between requests and commands to the server. To fix I changed from a centralized database ; to data and images being saved to the directories - turned off all plugins ; rebuilt by database; turned plugins back on and all problems disappeared. Now I am seeing 2 second or less turnaround times for everything - and no memory issues. Not saying this is your specific problem - but my issues started up without warning and no specific errors in debug logs which pointed me into the right direction. My database before the switch was about 14 gigs in size - which is a lot of data to scan through when the system was processing requests. Its about 700 megs now with the same amount of content Edited July 18, 2017 by lexisdude 5 Link to comment Share on other sites More sharing options...
Untoten 295 Posted July 18, 2017 Share Posted July 18, 2017 For what its worth. I was having these type of problems. Extreme amounts of memory usage - system slowing down to a crawl; taking a very long time to load screens in the web browser and on my roku devices. Ended up being a corrupt or skewed database - even though I was not getting any database errors I was seeing timeouts because of the length of time it was taking between requests and commands to the server. To fix I changed from a centralized database ; to data and images being saved to the directories - turned off all plugins ; rebuilt by database; turned plugins back on and all problems disappeared. Now I am seeing 2 second or less turnaround times for everything - and no memory issues. Not saying this is your specific problem - but my issues started up without warning and no specific errors in debug logs which pointed me into the right direction. My database before the switch was about 14 gigs in size - which is a lot of data to scan through when the system was processing requests. Its about 700 megs now with the same amount of content That would be viable, however I just rebuilt my entire system. It is being caused my chapter image extraction most likely. Link to comment Share on other sites More sharing options...
Lighthammer 80 Posted July 19, 2017 Share Posted July 19, 2017 (edited) Yea, there's a clear problem growing. I'm working under the model "1 GB of memory for 1 TB of storage". I have 16 GB in currently and just under 15 TB of storage for media.Server is really starting to crawl as of a few patches ago. Attached is my server log.I haven't done extensive diagnostics as of this post, but I do run Process Explorer regularly. It's recorded a crash from memory consumption on average once every 28-32 hours. Not quiet daily, but dang close and it's not even streaming actual video most of the time. Edited July 19, 2017 by Lighthammer 1 Link to comment Share on other sites More sharing options...
rhodges 37 Posted July 19, 2017 Share Posted July 19, 2017 I am only writing this to compare with. It is not a "I don't have a problem, it you" post. I saw some increased memory usage the other day and the server was unresponsive. I think it was using only about 3 or 4GB of memory. I noticed in the logs I was seeing a "could not find session with id {guid}" type message. Probably one of my clients kept requesting this information. I restarted Emby and haven't had a problem. I am on version 3.2.24.0 with a 40TB library. Metadata is not stored with the video. Running Windows 2016 server. My library.db is about 430MB and it was using about 500MB of memory while in the middle of the download subtitles task. I have been running the beta versions and updating for a long time now. No music and I do have a few plugins, including a personal plugin I authored. I normally use Emby for Kodi, but I also use the web client and rarely the android client. I also have the addon for HomeAssistant which talks to Emby. I only have movies and tv series in the library. No music or anything else. Usually there are a couple of TV shows every day that is scanned into the server with movies a couple of times a week I'd guess. 1 Link to comment Share on other sites More sharing options...
ebr 14863 Posted July 19, 2017 Share Posted July 19, 2017 Thank you for clarifying. Perhaps a something to consider including? Some of the apps already have the ability for you to send a log and they automatically send logs when we can detect a crash. Link to comment Share on other sites More sharing options...
parrish 18 Posted July 19, 2017 Author Share Posted July 19, 2017 (edited) Here are my server logs. I've attached them as a zip file. In looking through the logs I am seeing numerous DLNA entries like this: 2017-07-16 23:59:58.7911 Info HttpServer: HTTP Response 200 to 10.100.90.115. Time: 2ms. http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events2017-07-16 23:59:58.7911 Info HttpServer: HTTP SUBSCRIBE http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events. UserAgent: Those IP addresses all point back to my Dish Hopper3 and Joeys. So not sure if there is something going on between Emby and Dish that might be causing the continually growing RAM usage? For now I've had to disable the Emby Server and only plan on starting it back up when I need to access any media. Which is not ideal but really the only way I keep my overall server healthy. server-63635919447.zip Edited July 19, 2017 by parrish Link to comment Share on other sites More sharing options...
Luke 36888 Posted July 19, 2017 Share Posted July 19, 2017 Here are my server logs. I've attached them as a zip file. In looking through the logs I am seeing numerous DLNA entries like this: 2017-07-16 23:59:58.7911 Info HttpServer: HTTP Response 200 to 10.100.90.115. Time: 2ms. http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events 2017-07-16 23:59:58.7911 Info HttpServer: HTTP SUBSCRIBE http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events. UserAgent: Those IP addresses all point back to my Dish Hopper3 and Joeys. So not sure if there is something going on between Emby and Dish that might be causing the continually growing RAM usage? You do have a device on your network which is hitting the server pretty hard with a lot of requests. Link to comment Share on other sites More sharing options...
parrish 18 Posted July 19, 2017 Author Share Posted July 19, 2017 You do have a device on your network which is hitting the server pretty hard with a lot of requests. As mentioned, those IP's are all from the Dish Hopper3 and Joeys (I have two Joeys). Not certain just what it is they are doing or why. They aren't being used to access any DLNA content at those times. Link to comment Share on other sites More sharing options...
rhodges 37 Posted July 19, 2017 Share Posted July 19, 2017 Here are my server logs. I've attached them as a zip file. In looking through the logs I am seeing numerous DLNA entries like this: 2017-07-16 23:59:58.7911 Info HttpServer: HTTP Response 200 to 10.100.90.115. Time: 2ms. http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events 2017-07-16 23:59:58.7911 Info HttpServer: HTTP SUBSCRIBE http://10.100.90.1:8096/dlna/b8e092944e81439ab2301593815a3fac/contentdirectory/events. UserAgent: Those IP addresses all point back to my Dish Hopper3 and Joeys. So not sure if there is something going on between Emby and Dish that might be causing the continually growing RAM usage? For now I've had to disable the Emby Server and only plan on starting it back up when I need to access any media. Which is not ideal but really the only way I keep my overall server healthy. I'm guessing by your first post that you are using DNLA? You might try turning it off on Emby and see what it does. Link to comment Share on other sites More sharing options...
parrish 18 Posted July 19, 2017 Author Share Posted July 19, 2017 Correct, the DLNA portion is the primary reason I use Emby. I have a Hopper and/or Joey connected to each of my TV's and use DLNA to stream Emby content through those Dish devices. I REALLY wish Dish had an Emby app- but they don't. Without DLNA I would have no use for Emby, unfortunately. But I will try disabling DLNA and leave the Emby server running for a few days to see if the RAM usage is affected. At the very least that would help to point more directly to the root of the problem. 1 Link to comment Share on other sites More sharing options...
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