Jump to content

Emby 3.5.3 on NAS not releasing memory


hollomat

Recommended Posts

Hi @@solabc16,

 

Beta now installed, thanks. My system prior to installing the beta had run up to 1.45gb of RAM in use whilst having been idle for 15+ hours. I'll leave the beta running idle for a bit this morning, see what happens and report back as appropriate.

 

Guy

Link to comment
Share on other sites

Hello @@solabc16

 

I said in a previous post that I did not see a different behavior, but I have to take it back.

 

Last night, emby process was taking nearly 1GB ram.  This morning, emby process was arround 200MB.  The NAS did not reboot.  Emby server did not seem to have rebooted also.  This afternoon, emby process was around 500MB and tonight it has dropped back to 200MB.  I did not see this behavior  on 3.5.3.

 

Regards.

Link to comment
Share on other sites

Hi @@solabc16,

 

Watched a film last night and this morning ram use is sitting at 770-860 mb whilst idle. It doesn't really seem to have dropped much since the film finished a little over 12 hours ago but it also doesn't seem to be increasing the way it used to.

 

I've just deleted the scheduled task for organise media in a last-ditch attempt to remove whatever is triggering the constant library scans, which looks like it might've worked and if so then from there I'm hoping to see more of a steady-state in ram use.

Link to comment
Share on other sites

solabc16

Hi @@Gronda

 

Thanks, 770-860MB doesn't sound unreasonable if the system has some headroom available, the key now will be to see whether or not it continues growing over time.

 

Best

- James

Link to comment
Share on other sites

Hi @@solabc16,

 

It's workable and from last night had no trouble serving an HD file for us to watch. It is quite a bit higher than the 230mb it usually sits around when the server first starts but as with others in this thread, the problem was the constantly growing footprint so provided it stays at a stable point I think it might be nailed.

 

On the upside, removing the 0.08333333333333 scheduled task for organising media seems to have stopped the incessant library scans but it looks like that was the trigger used by auto organise to pickup new files in a watch folder.

Link to comment
Share on other sites

solabc16

Hello @@Gronda

 

On the upside, removing the 0.08333333333333 scheduled task for organising media seems to have stopped the incessant library scans but it looks like that was the trigger used by auto organise to pickup new files in a watch folder.

 

 

Can you elaborate a little further and provide a log that contains an occurrence of this happening? Once the initial full scan has completed, any media changes after that shouldn't be continually triggering full scans of the library.

 

Best

- James

Link to comment
Share on other sites

 

Hello @@rouq - thanks for the update, was this with 4.0.0.2-1?

 

Best
- James

 

 

Hello @@solabc16

 

Yes, it's on 4.0.0.2-1.  This morning mono is using 620MB.  I will closely monitor this.  If I see any changes in behavior, I will let you know.

 

More info, I have a DS418play with 8GB ram (2x4GB matched pair)

 

Another question, for the mono process to drop from 1GB to 200MB, is it possible that emby server has restarted by its own?  Is there an easy way from the logs to see if it's what happened?

 

Regards

Link to comment
Share on other sites

Hello @@Gronda

 

 

Can you elaborate a little further and provide a log that contains an occurrence of this happening? Once the initial full scan has completed, any media changes after that shouldn't be continually triggering full scans of the library.

 

Best

- James

 

Hi @@solabc16,

 

I mentioned this a while back (https://emby.media/community/index.php?/topic/63685-emby-353-on-nas-not-releasing-memory/?p=666132) - my system seemed to be repeatedly running library scans even after I thought I'd deleted all the scheduled tasks for it. I've just tried removing and reinstalling the auto organise plugin to see if that recreated the scheduled task but it hasn't (neither has disabling, saving, then re-enabling either auto-detect for series / movies or the auto organise feature itself for TV / movies. So I don't know where the task originated - it certainly wasn't something I configured manually.

 

It was a consistent thing happening throughout all the logs I've uploaded previously. 

 

Fresh logs at: sendlogs_Weyland-Yutani_synology_apollolake_918+_20190120T142251UTC.tgz 

 

The last scheduled task triggered scan should've been around 1205-1210 with the task deleted shortly thereafter.

 

Guy

Link to comment
Share on other sites

solabc16

Hello @@rouq

 

Another question, for the mono process to drop from 1GB to 200MB, is it possible that emby server has restarted by its own?  Is there an easy way from the logs to see if it's what happened?

 

If you can run the Send Logs utility - https://github.com/MediaBrowser/Wiki/wiki/Synology-:-How-to-Send-us-Support-Logs, I'll be able to take a look and see if this is what happened - and if so, why.

 

Best

- James

Link to comment
Share on other sites

solabc16

Hello @@Gronda

 

So, with the task removed and the 'Auto Organize' plugin reinstalled, do you have the functionality you expect to have - but without this problematic library scanning?

 

    i.e. the system is now working as you expect it to?

 

Best

- James

Link to comment
Share on other sites

Hi @@solabc16,

 

Not quite - the auto organise plugin needs to be prompted to run when I put files in the watch folders by accessing the plugin via "manage server" and clicking "organise". Once prompted it all that works as expected and puts the files in folders in the right libraries, then runs a scan and pulls in the data.

 

After an afternoon of viewing, RAM use is sitting abound 750-770mb now whilst back to being idle and seems pretty stable.

Link to comment
Share on other sites

solabc16

Hi @@Gronda

 

Not quite - the auto organise plugin needs to be prompted to run when I put files in the watch folders by accessing the plugin via "manage server" and clicking "organise".

 

Is that how it's expected to work? I'm not that familiar with this plugin.

 

Best

- James

Link to comment
Share on other sites

Hi @@Gronda

 

 

Is that how it's expected to work? I'm not that familiar with this plugin.

 

Best

- James

 

In this case, yes, if he deleted all of the scheduled task triggers for it then that is expected behavior. He will just have to run it manually.

Link to comment
Share on other sites

solabc16

I've just tried removing and reinstalling the auto organise plugin to see if that recreated the scheduled task but it hasn't (neither has disabling, saving, then re-enabling either auto-detect for series / movies or the auto organise feature itself for TV / movies. So I don't know where the task originated - it certainly wasn't something I configured manually.

@@Gronda?

 

Best

- James

Edited by solabc16
Link to comment
Share on other sites

erikblues

Hello @@hollomat, @@majorsl, @@Gronda, @@andcbii, @@erikblues, @@diegov, @@3djc, @@rouq

 

If you've updated to the latest stable (4.0.0.2-1), let me know if you're seeing any difference in behaviour with this release.

 

For those of you on the beta channel, there's a further update (4.0.0.2-2) available.

 

Best

- James

 

Hi James,

 

on my device (synology DS415play) the RAM usage went down with the latest update and also conversion tasks seem to be working better.

I haven't been able to test everything yet because one of my HD is acting up with bad sectors and I will have to replace it before doing any HD-heavy tasks, but it seems to be much better and I will let you know if I encounter any issues.

 

Thanks for your hard work and all those bug fixes :)

Link to comment
Share on other sites

@@solabc16,

 

As Luke says, by removing the scheduled task it seems I have to run it manually. I've created a new organise media task every 15 mins (the quickest I can set manually) and this seems to work reasonably well and only triggers a media scan library once there is something new in one of the folders to organise. It also gives plenty of time for any consequent library scan to run and I wonder if this is part of issue.

 

When I run a library scan the RAM use increases - could it be that because this task (as set to 0.083333...) ran so frequently and then triggered a library scan when there were media in the folder to sort that these were somehow "stacking up" and eating the RAM?

Link to comment
Share on other sites

solabc16

Thanks for the update @@erikblues, appreciated.

 

@@Gronda - the piece I guess I'm missing in my understanding is whether this scheduled task is installed as part of the plugin installation. You said you deleted the task, then removed the plugin entirely and installed it again - at which point no scheduled tasks were created?

 

The library scan should not run concurrently - i.e. only one scan should ever be active. I would expect an increase in memory whilst the scan ran, but I would also expect this is decrease on completion of the scan. If the memory can be demonstrated to continually increase with every run of the scan, then that's a reasonably clear sign that there's a resource leak to be addressed.

 

Best

- James

Link to comment
Share on other sites

Hi @@solabc16,

 

Sorry for the delay in responding.

 

@@Gronda - the piece I guess I'm missing in my understanding is whether this scheduled task is installed as part of the plugin installation. You said you deleted the task, then removed the plugin entirely and installed it again - at which point no scheduled tasks were created?

 

The library scan should not run concurrently - i.e. only one scan should ever be active. I would expect an increase in memory whilst the scan ran, but I would also expect this is decrease on completion of the scan. If the memory can be demonstrated to continually increase with every run of the scan, then that's a reasonably clear sign that there's a resource leak to be addressed.

 

Correct. I've just been through the uninstall / reinstall of the plugin again after deleting the manually created task and rebooting the server between steps. The "Organize new media files" entry remains without any tasks created. Given that it is remembering my settings between removal and reinstall I don't know whether there is anything stored to block it from creating the scheduled task if it's previously been deleted.

 

On overall performance, after a couple of days left to run and with standard evening use of watching a couple of episodes of something, yesterday evening it was up to 1.1gb when idle and today before the reboots for the plugin it was at 1.17gb so something is still causing a gradual increase albeit much slower than before. I'll leave the organise media task without any schedule and see what happens over the next few days.

 

Yesterday whilst testing whether library scans had any impact I ran three scans in succession - each time the memory use increased and then after the scan was done dropped back to where it had been before the scan (started at 1.1gb, hit a peak of 1.9gb and then back to 1.1gb by the end). There was no media to scrape with these scans but it all seemed to work as you'd expect.

Link to comment
Share on other sites

solabc16

Hello @@Gronda

 

Thanks for the update, glad to hear the memory management when performing scans is behaving as expected.

 

We'll keep paying attention to the memory footprint and any potential leaks as we continue the development effort.

 

Regarding the behaviour of the plugin and associated scheduled tasks, probably worth posting and asking the question in a forum dedicated to the plugin; see if you can get a definitive answer on what is expected.

 

Best

- James

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...