Jump to content

Emby server memory usage


parrish

Recommended Posts

thanks for the info guys. be sure to watch out for the mbam service eating up your RAM. This is not an Emby service.

Link to comment
Share on other sites

  • 2 months later...
BloodyIron

So yeah, just noticed this is in the Windows section. I'm on Linux, but still having the RAM growth issue. :(

 

VM has 2GB of RAM, and as of this writing it's used that up annd pushed into 830MB of swap too.

 

I just checked my recent historical graphs (monitoring) and this growth is continuing to happen, and only gets "undone" when an Emby Server update happens.

 

My usage pattern has not changed in the last bunch of months, so I'm not sure if this is a new thing since I'm now on .NET Core, but I don't seem to be getting the "lean memory usage" that others are reporting in this thread.

 

What should I do next?

Link to comment
Share on other sites

BloodyIron

Ugh I had to forcefully reboot the VM due to storage issues (unrelated), so I'm afraid I was unable to retrieve relevant server logs in time. It seems likely to happen again, so when it reaches that point I'll try to be more diligent to get server logs. Sorry!

Link to comment
Share on other sites

BloodyIron

I wish I could be more helpful in this case :(

 

Is there anything else I can do that might help identify the cause in the interim? Or is it strictly "we need server logs when it happens again"?

 

 

Thanks for the feedback.

Link to comment
Share on other sites

I thought MB was eating my ram but it was Radarr. I was running MB and Radarr, Sonarr and Jackett on a linux box MB became useably slow I then notice Radarr was using 2GB of ram. Long story short I moved Radarr to my Windows 7 Plex box and now Radarr is behaving and MB is rock solid again. Just thought I would throw it out there.

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...
mohamedh

Hello,

I've a similar issue with emby server, on 24GB ram machine.The memory usage keeps increasing till it consumes all my ram and emby server crashes.

I already uninstalled all extensions but I still got the issue.

here is a link to all my logs,
--------------

Hope someone can help me to solve this problem and thanks in advance

Edited by mohamedh
Link to comment
Share on other sites

mohamedh

Hi, can you please just attach a single log file? I would suggest editing out your ip address. Thanks.

thanks for your quick reply, I have edited my last post to included a single log file.

Link to comment
Share on other sites

khaled2010998

da4bb9835444f1b48eb048184362d77b.png

 

The same problem .. omitted all additions now have 25 hours and work

 

(Delete all additions)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

EODCrafter

Been following along on this thread. I have a tiny server (1 CPU and 1.7Gb of Ram) and I have found it necessary to "clean the cache" every so often. I'm not sure if this works on a Windows System or how to implement it, but it works on a Linux Server. Perhaps someones knows how this can be implemented for Windows?

Here's the Method....

 

How to Clear Cache in Linux?

Every Linux System has three options to clear cache without interrupting any processes or services.
 
1. Clear PageCache only.
 
# sync; echo 1 > /proc/sys/vm/drop_caches
 
 
2. Clear dentries and inodes.
 
# sync; echo 2 > /proc/sys/vm/drop_caches
 
3. Clear PageCache, dentries and inodes.
 
# sync; echo 3 > /proc/sys/vm/drop_caches 
Explanation of above command.
 
sync will flush the file system buffer. Command Separated by “;” run sequentially. 
The shell wait for each command to terminate before executing the next command in the sequence. 
As mentioned in kernel documentation, writing to drop_cache will clean cache without killing any 
application/service, command echo is doing the job of writing to file.
 
If you have to clear the disk cache, the first command is safest in enterprise and production 
as  “...echo 1 > ….” will clear the PageCache only. It is not recommended to use third 
option above  “...echo 3 >” in production until you know what you are doing, as it will clear 
PageCache, dentries and inodes.
 
Is it a good idea to free Buffer and Cache in Linux that might be used by Linux Kernel?
When you are applying various settings and want to check, if it is actually implemented specially 
on I/O-extensive benchmark, then you may need to clear buffer cache. You can drop cache as explained 
above without rebooting the System i.e., no downtime required.
 
Linux is designed in such a way that it looks into disk cache before looking onto the disk. If it finds 
the resource in the cache, then the request doesn’t reach the disk. If we clean the cache, the disk cache 
will be less useful as the OS will look for the resource on the disk.
 
Moreover it will also slow the system for a few seconds while the cache is cleaned and every resource 
required by OS is loaded again in the disk-cache.
 
Now we will be creating a shell script to auto clear RAM cache daily at 2am via a cron scheduler task. 
 
Create a shell script clearcache.sh and add the following lines.
 
#!/bin/bash
# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
echo "echo 3 > /proc/sys/vm/drop_caches"
Set execute permission on the clearcache.sh file.
 
# chmod 755 clearcache.sh
Now you may call the script whenever you required to clear ram cache.
 
Now set a cron to clear RAM cache everyday at 2am. Open crontab for editing.
 
# crontab -e
Append the below line, save and exit to run it at 2am daily.
 
0  2  *  *  *  /path/to/clearcache.sh
For more details on how to cron a job you may like to check our article on 11 Cron Scheduling Jobs.
 
Is it good idea to auto clear RAM cache on production server?
No! it is not. Think of a situation when you have scheduled the script to clear ram cache everyday at 2am. 
Everyday at 2am the script is executed and it flushes your RAM cache. One day for whatsoever reason, may be 
more than expected users are online on your website and seeking resource from your server.
 
At the same time scheduled script run and clears everything in cache. Now all the user are fetching data from 
disk. It will result in server crash and corrupt the database. So clear ram-cache only when required,and known 
your foot steps, else you are a Cargo Cult System Administrator.
 
How to Clear Swap Space in Linux?
If you want to clear Swap space, you may like to run the below command.
 
# swapoff -a && swapon -a
Also you may add above command to a cron script above, after understanding all the associated risk.
 
Now we will be combining both above commands into one single command to make a proper script to clear 
RAM Cache and Swap Space.
 
# echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
OR
$ su -c "echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'" root
Link to comment
Share on other sites

Server log?

I have already posted it in my previous post,  but here's the link again:

 

---------------

Edited by mohamedh
Link to comment
Share on other sites

There's nothing really abnormal there. you could try removing the anime plugin as well as turning off the server's dlna features and see if that helps. thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Hi

i seem to be having this Memory Problem Emby server will run for a few days two or three and will use about 300.00K  

and then for no reason that i can see it will just start to eat the ram all of it,

now i have 32gig in the machine and emby will use 31gig of that and then the machine will stop responding

now up until two or three weeks ago i never had this problem emby could run for weeks with no problem or until the temp transcode drive was full

then i would have to restart emby to clear the temp folder

 

running on Win 7 64bit with minimal software just Antivirus , backup software , recode software, Ftp software,   and remote desktop software

 

as i have looked and found that other people have had memory usage problems in the past does anyone know what could be causing this  

 

thanks

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...