Jump to content

DSM 7.3 system is out of memory


Go to solution Solved by sa2000,

Recommended Posts

Posted
 

Hello there.

Unfirtunately problem not solved.... i thiught that when i buy more RAM everything is going to be ok but it isnt, it happened again.

i did a little research myself but im not a brainiac like you guys so i use common sense i try to find anything out of the ordinary and this is what i found:

image.thumb.png.cce42c8234dbbddb40df3c5fefdb3009.png

when i looked at memory i found nothing, network also in normal state but CPU was alarming:

image.thumb.png.6041589a29208ce74852eb622e0049af.png

i/o wait cause emby to crash. as far as read about his it is cause by applicatio it self but that all i could understan maybe someone have an idea how to fix this?

 i want to also add that it happend when server was idle in the middel of the night - everytime, i attach logs as well.

 

 

embyserver.txt

Posted

Hi, please try removing these plugins:

2025-11-13 11:55:30.187 Info App: Loading statistics, Version=3.4.2.0, Culture=neutral, PublicKeyToken=null from /var/packages/EmbyServer/var/plugins/Statistics.dll
2025-11-13 11:55:30.188 Info App: Loading TvMaze, Version=4.8.12.0, Culture=neutral, PublicKeyToken=null from /var/packages/EmbyServer/var/plugins/TvMaze.dll

Then restart the server and see how things compare. Thanks.

Posted

Thank you for your help. I certainly will do that. But I need a couple of days to check if that works because this doesn’t happen every day. I hope you don’t mind. I leave the subject open and I give you a shout in a couple of days, maybe two or three weeks.

  • Thanks 1
Posted

hello Luke.

Unfortunately, I didn’t have to wait long. It happens again this night I have yesterday disconnected those two plugs that you suggested and then in the middle of the night this happened again. The strange thing is that it happens again of the same time. I attached a new log file.

image.thumb.jpeg.bee4c6ff5a6cfc8654790e5c30e71da6.jpeg

image.thumb.jpeg.972afcc43936439fb0a689b8d318d7de.jpeg

any solution on your mind?

syslog_2025-11-19-13_37_20.csv

Posted

OK we are looking into it. Thanks.

Posted (edited)

@KiniuTo see if it is to do with scanning media libraries, could you do the following:

- enable debug logging on emby server - see Log Files article

- in an ssh session to the NAS (using puTTY for example) run the following script:

(echo "PID,time,VmPeak,VmSize,VmLck,VmPin,VmHWM,VmRSS,VmData,VmStk,VmExe,VmLib,VmPTE,VmSwap"; while :; do PID=$(pidof EmbyServer | awk '{print $1}'); [ -z "$PID" ] && { sleep 1; continue; }; printf "%s," "$PID"; date "+%F %T" | tr '\n' ','; awk '/^VmPeak|^VmSize|^VmLck|^VmPin|^VmHWM|^VmRSS|^VmData|^VmStk|^VmExe|^VmLib|^VmPTE|^VmSwap/ {gsub(/ kB/, "", $2); gsub(/[ \t]/, "", $2); printf "%s,", $2}' /proc/$PID/status | sed 's/,$//'; echo; sleep 1; done) | tee "$(cat /etc/hostname)_emby_memory_log_$(date +%F).csv"

This will log memory use second by second to the screen and also to a file in the current directory for the ssh session into a file named: "<server-name>_emby_memory_log_<date>.csv"

Leave this running 

Then restart Emby Server to get fresh logs and also to capture memory use from start

When the problem arises with the emby server process stopped capture the syslog and emby server log (if going overmidnigh, include all logs covering period) and the csv file created by the script

The server appears to be running with the default settings for db connections and cache size. The emby server log you attached  shows a total of 1280Mb would have been used for DB Cache for the total number of DB connections made - what is the NAS RAM capacity?

 

Edited by sa2000
Posted

@Kiniu Some feedback for other issues seen in the log

- You have reached the iNotify limit of 8192 for the libraries "Real Time Monitoring"

System.IO.IOException: System.IO.IOException: The configured user limit (8192) on the number of inotify watches has been reached, or the operating system failed to allocate a required resource.

See this topic for info on this How to fix RTM not working caused by limited inotify instances watches

 

- You have permissions issue on your emby server backup path "/volume1/music/Emby backup/"

2025-11-13 12:00:03.631 Error Backup & Restore: Error copying file from /var/packages/EmbyServer/var/config/users/0c379bb4074b43e4a229071b9be6e75a/@eaDir/poster.png/SYNOPHOTO_THUMB_XL.jpg to /volume1/music/Emby backup/embyserver-backup-full/config/users/0c379bb4074b43e4a229071b9be6e75a/@eaDir/poster.png/SYNOPHOTO_THUMB_XL.jpg
. . .
System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/volume1/music/Emby backup/embyserver-backup-full/config/users/0c379bb4074b43e4a229071b9be6e75a/@eaDir/poster.png/SYNOPHOTO_THUMB_XL.jpg' is denied.
     ---> System.IO.IOException: Permission denied

 

  • Like 1
Posted
1 hour ago, sa2000 said:

@KiniuTo see if it is to do with scanning media libraries, could you do the following:

- enable debug logging on emby server - see Log Files article

- in an ssh session to the NAS (using puTTY for example) run the following script:

(echo "PID,time,VmPeak,VmSize,VmLck,VmPin,VmHWM,VmRSS,VmData,VmStk,VmExe,VmLib,VmPTE,VmSwap"; while :; do PID=$(pidof EmbyServer | awk '{print $1}'); [ -z "$PID" ] && { sleep 1; continue; }; printf "%s," "$PID"; date "+%F %T" | tr '\n' ','; awk '/^VmPeak|^VmSize|^VmLck|^VmPin|^VmHWM|^VmRSS|^VmData|^VmStk|^VmExe|^VmLib|^VmPTE|^VmSwap/ {gsub(/ kB/, "", $2); gsub(/[ \t]/, "", $2); printf "%s,", $2}' /proc/$PID/status | sed 's/,$//'; echo; sleep 1; done) | tee "$(cat /etc/hostname)_emby_memory_log_$(date +%F).csv"

This will log memory use second by second to the screen and also to a file in the current directory for the ssh session into a file named: "<server-name>_emby_memory_log_<date>.csv"

Leave this running 

Then restart Emby Server to get fresh logs and also to capture memory use from start

When the problem arises with the emby server process stopped capture the syslog and emby server log (if going overmidnigh, include all logs covering period) and the csv file created by the script

The server appears to be running with the default settings for db connections and cache size. The emby server log you attached  shows a total of 1280Mb would have been used for DB Cache for the total number of DB connections made - what is the NAS RAM capacity?

 

Hi sa2000. myram capcity is 8gb. 

is there any chance you can send me a tutorial or something how to navigate in command line? im really new to this but really whats to try.:)

 

  • Thanks 1
Posted
7 minutes ago, Kiniu said:

is there any chance you can send me a tutorial or something how to navigate in command line? im really new to this but really whats to try.:)

If you have the following enabled then each user login into the NAS through ssh will have a home directory used and will be the default directory on login through ssh using puTTY

Synology NAS: Control Panel / User & Group / Advanced
Enable User Home Service

The home directories will be on the NAS under "/volume1/homes/" with a sub-directory for the username 

So when you login using ssh, the current directory will be that - you can confirm that by typing command "pwd" after login using puTTY

So then you similary paste in the one-liner script I gave you and the output file will be in that home directory

The next area to look into is how to get the file out of the NAS to a PC. You could try to use Synology File Station to navigate to the directory and try download

 

 

 

 

Posted

Done. so nowo shall i wait at lest a day... this mostly happens at night. i will let you know as soon as i have that log file for you. thank u for your help i appreciaye this.

Posted (edited)
7 minutes ago, Kiniu said:

shall i wait at lest a day... this mostly happens at night. i will let you know as soon as i have that log file for you. thank u for your help i appreciaye this.

yes - wait a day. Emby server logs normally rotate at midnight so when looking for logs tomorrow, pick latest emby server log and one before it as well

We may find it is to do with the scheduled task: Scan Media Library, in which case you can switch it to run less frequently eg once a week thus reducing the impact of the problem - we can look into that after looking at the diagnostics you capture

(Note - if for some reason the memory logging script needs to be restarted, then you would need to change the output file name in the script before you re-run it, since it would overwrite the existing csv file, eg. replacing "$(cat /etc/hostname)_emby_memory_log_$(date +%F).csv" with "$(cat /etc/hostname)_emby_memory_log_$(date +%F)b.csv")

 

Edited by sa2000
Posted

ok will do. or i just pull the log file first out of directory and then restart...

Posted
Just now, Kiniu said:

just pull the log file first out of directory and then restart...

sure - and providing both files afterwards (you will have to rename one of them)

Posted

Hi...

Unfortunately, for me, this crash didn’t happen during that night so I stopped the log and I started a new one. I attached de logs to that post, but I was analyzing what you wrote it to me about scanning Media library, during that log I have scanned the library couple of times and seems like it didn’t have any bad effect on this. ( i force scanning when i add new files or change icons etc...)

In the meantime, I also set up log which was suggested in that link. I’m sending you those files as well. Maybe it will help. files script and output.

image.thumb.jpeg.6a6b777296fd096493b21b220239dad3.jpeg

Another thing is about the size of the cash on the server. I changed that number to the highest possible maybe that was the reason why he didn’t happen last night. if this decision was not wise please let me know and i change back to default value.

image.thumb.jpeg.5a1e0624a3bf2c2809711bcfbe63aab3.jpeg

"Oh and one more thing"... ;) 

image.thumb.jpeg.ee0c06f3ee6d3b96cf6c145c550aeb25.jpeg

One more thing I would like to mention is that my NAS have eight gig Ram capacity.but this is recent, when this starts I had only four gig RAM. I thought that when I buy more RAM, it will not happen again (but unfortunately dId ) so I add another piece of RAM, which at the end didn’t make any change.

hope this maybe helps.

 

script.log output.log MothServucker_emby_memory_log_2025-11-21 (1).csv MothServucker_emby_memory_log_2025-11-22.csv MothServucker_emby_memory_log_2025-11-21.csv

Posted (edited)
10 hours ago, Kiniu said:

so I stopped the log and I started a new one.

You don't need to do that. You can leave it running.  I see you left the original script running and started another one on 22 november at 00:57:49.

That is fine. So long as I have complete memory logging from launch time of emby server up to the time of the issue arising

You mention cache. you mention running scanning twice but you did not include the embyserver logs for the times covered by memory logging and you doing these changes / tests

You quoted the iNotify limit issue of 8192 but then said you changed the db cache to 8100. That was wrong thing to do. The db cache has nothing to do with the iNotify Library Real Monitoring issue. Please set the db cache back to the default of 128 Mb and restart the server - but switch to the new script below and run it before you restart the server

For the iNotify issue, read the linked forum topic that i gave you here

One other thing to be aware is that server logs get purged after 3 days - so you either save the files out of the logs folder every 2 days or you restart the emby server evey 3 days and hope you can get the problem arise within the 2-3 day period. If you do copy the logs files out to save them, note these copies would not be sanitized so do not post in the forum - you can zip all the files and PM to me if you did copy them out.

PS: You can switch to this version of the script which will append if restarted on same day

 

(echo "PID,time,VmPeak,VmSize,VmLck,VmPin,VmHWM,VmRSS,VmData,VmStk,VmExe,VmLib,VmPTE,VmSwap"; while :; do PID=$(pidof EmbyServer | awk '{print $1}'); [ -z "$PID" ] && { sleep 1; continue; }; printf "%s," "$PID"; date "+%F %T" | tr '\n' ','; awk '/^VmPeak|^VmSize|^VmLck|^VmPin|^VmHWM|^VmRSS|^VmData|^VmStk|^VmExe|^VmLib|^VmPTE|^VmSwap/ {gsub(/ kB/, "", $2); gsub(/[ \t]/, "", $2); printf "%s,", $2}' /proc/$PID/status | sed 's/,$//'; echo; sleep 1; done) | tee -a "$(cat /etc/hostname)_emby_memory_log_$(date +%F).csv"

 

The script should be running before server is launched. If the server is relaunched later it will automatically pick the new process PID - so you can leave this running all the time until you get the problem and when you do, make sure you include the debug enabled server logs as well as the memory log csv file

Thanks

 

Edited by sa2000
Posted

Hi sa2000.

I just wanna say that very weird thing happened despite the fact that I was waiting for three days until Emby crashes, the log that you told me to put on - crashed a few seconds before MB crashed so I think it’s not on there. Because it didn’t save into the hard drive . I’m sending the logs anyway, so you can have a look . What I think is also worth to mention that my hard drive, which MB was on - crashed. I have to install MB all over again on a different hard drive and then I started the logs again. During that period I’ve noticed that the memory goes up to 90 to 95%. So my question is how much does MB needs memory to work fine without disturbance?

MothServucker_emby_memory_log_2025-11-25.csv MothServucker_emby_memory_log_2025-11-23.csv

Posted
2 hours ago, Kiniu said:

I just wanna say that very weird thing happened despite the fact that I was waiting for three days until Emby crashes, the log that you told me to put on - crashed a few seconds before MB crashed so I think it’s not on there. Because it didn’t save into the hard drive . I’m sending the logs anyway, so you can have a look . What I think is also worth to mention that my hard drive, which MB was on - crashed. I have to install MB all over again on a different hard drive and then I started the logs again. During that period I’ve noticed that the memory goes up to 90 to 95%. So my question is how much does MB needs memory to work fine without disturbance

These show that Emby Server was launched on 23 November at 14:43 and was at 5Gb RSS Memory usage at 20:46 on the 25th. Peaked close to 6Gb at 19:45

Without the corresponding debug emby server logs, it would be a waste of time looking any further into these figures

 

Posted
27 minutes ago, Kiniu said:

here are latest debug logs. please tell me if you need anythuing else. 

They are no good for me.

If you recall, I am after memory logging from launch time up to time of issue with the corresponding debug server logs for the same period. No harm if they cover longer period than that but definitely for that as minimum period and they must correspond to each other

memory logging for 23 to 25 november and server logs for 28th november is not what I am after to look at

 

Posted
2 hours ago, Kiniu said:

I have all the files that you need eventually prepared for you

I need all the embyserver log files downloaded and attached

You have given me the embyserver file for 45 seconds period from 3 December 13:18:08 to 13:18:46

I need all the embyserver-xxxxx.txt files for the following period: 1 December 12:11 (time of launch of emby server) up to 3 December 13:15 (when it crashed)

By the way your memory logging got interrupted at 10:45 on 2 December and i have a gap up to 12:36 2 December. But at that time - although it did not crash memory use was at similar level close to 5.5 Gb. 

So just download all the other embyserver logs before they get purged. They get purged after 3 days 

 

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