chudak 24 Posted July 11, 2021 Posted July 11, 2021 When I try streaming a 4K live TV emby actually runs out of memory. Auch ! Never seen this before. It actually happens only if Chrome browser is used (not on Android app) and the errors are in /var/log/syslog: ==> /var/log/syslog <== Jul 11 08:37:58 emby-vm kernel: [ 1738.528575] out_of_memory+0x1cf/0x520 Jul 11 08:37:58 emby-vm kernel: [ 1738.528587] mem_cgroup_charge+0x8a/0x280 Jul 11 08:37:58 emby-vm kernel: [ 1738.528592] ? scan_shadow_nodes+0x30/0x30 Jul 11 08:37:58 emby-vm kernel: [ 1738.528597] pagecache_get_page+0x161/0x3b0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528602] ? alloc_set_pte+0xf6/0x690 Jul 11 08:37:58 emby-vm kernel: [ 1738.528608] __do_fault+0x3c/0xe0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528613] do_user_addr_fault+0x1a3/0x450 Jul 11 08:37:58 emby-vm kernel: [ 1738.528619] exc_page_fault+0x6c/0x150 Jul 11 08:37:58 emby-vm kernel: [ 1738.528626] asm_exc_page_fault+0x1e/0x30 Jul 11 08:37:58 emby-vm kernel: [ 1738.528633] Code: Unable to access opcode bytes at RIP 0x7fb889523016. Jul 11 08:37:58 emby-vm kernel: [ 1738.528637] RAX: ffffffffffffff92 RBX: 00007fb7dc003b98 RCX: 00007fb88951f7b1 Jul 11 08:37:58 emby-vm kernel: [ 1738.528640] RBP: 00007fb7dc003b88 R08: 0000000000000000 R09: 00000000ffffffff Jul 11 08:37:58 emby-vm kernel: [ 1738.528642] R13: 00007fb7dc003b60 R14: 00007fb7dc003bb0 R15: 00007fb880128c40 Jul 11 08:37:58 emby-vm kernel: [ 1738.528647] swap: usage 524288kB, limit 524288kB, failcnt 3635 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] anon 2104713216 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file 9191424 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] kernel_stack 2752512 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] pagetables 8650752 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] percpu 798336 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] sock 856064 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] shmem 135168 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_mapped 7974912 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_dirty 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_writeback 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] anon_thp 1038090240 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_thp 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] shmem_thp 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] inactive_anon 1031098368 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] active_anon 1092120576 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] inactive_file 5955584 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] active_file 6447104 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] unevictable 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab_reclaimable 4069784 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab_unreclaimable 6707120 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab 10776904 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_refault_anon 219516 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_refault_file 48675 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_activate_anon 175263 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_activate_file 27720 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_restore_anon 83622 Jul 11 08:37:58 emby-vm kernel: [ 1738.528664] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name Jul 11 08:37:58 emby-vm kernel: [ 1738.528670] [ 19083] 0 19083 660 29 45056 0 0 agetty Jul 11 08:37:58 emby-vm kernel: [ 1738.528675] [ 19264] 0 19264 9511 16 69632 106 0 master Jul 11 08:37:58 emby-vm kernel: [ 1738.528680] [ 19266] 102 19266 9591 0 69632 125 0 qmgr Jul 11 08:37:58 emby-vm kernel: [ 1738.528685] [ 19408] 102 19408 9580 18 69632 105 0 trivial-rewrite Jul 11 08:37:58 emby-vm kernel: [ 1738.528690] [ 19410] 102 19410 10527 193 73728 0 0 tlsmgr Jul 11 08:37:58 emby-vm kernel: [ 1738.528696] [ 18994] 105 18994 6653 223 77824 0 0 systemd-network Jul 11 08:37:58 emby-vm kernel: [ 1738.528701] [ 19054] 0 19054 58193 216 94208 0 0 accounts-daemon Jul 11 08:37:58 emby-vm kernel: [ 1738.528706] [ 19056] 100 19056 1897 163 57344 0 -900 dbus-daemon Jul 11 08:37:58 emby-vm kernel: [ 1738.528714] [ 20000] 998 20000 915712 432914 5115904 100714 0 ffmpeg Jul 11 08:37:58 emby-vm kernel: [ 1738.528719] [ 19060] 0 19060 6565 565 90112 1336 0 networkd-dispat Jul 11 08:37:58 emby-vm kernel: [ 1738.528724] [ 19170] 33 19170 14234 185 98304 351 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528729] [ 19172] 33 19172 14234 178 98304 348 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528734] [ 19174] 33 19174 14234 110 98304 383 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528738] [ 19176] 33 19176 14234 123 98304 370 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528742] [ 19178] 33 19178 14234 138 98304 355 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528778] [ 19436] 0 19436 1584 125 53248 48 0 sudo Jul 11 08:37:58 emby-vm kernel: [ 1738.528783] [ 19438] 0 19438 642 20 40960 0 0 tail Jul 11 08:37:08 emby-vm systemd[1]: message repeated 15 times: [ Looping too fast. Throttling execution a little.] Jul 11 08:37:58 emby-vm systemd[1]: emby-server.service: A process of this unit has been killed by the OOM killer.
chudak 24 Posted July 11, 2021 Author Posted July 11, 2021 2 hours ago, Q-Droid said: Emby server log? http://sprunge.us/7PDdeB debug enabled Would be curios to hear what you will find Thx!
Q-Droid 989 Posted July 11, 2021 Posted July 11, 2021 This is what I see, can you confirm? Proxmox VM? 2GB RAM? 500MB swap? Any ramdisk or tmpfs in use? It looks memory starved and it used up swap. If you can give it more RAM that could help but also increase swap size to 1x RAM up to 4GB. Shouldn't need swap bigger than 4GB even if RAM goes well above that. If using ramdisk or tmpfs for storage such as transcoding temp paths that will eat up memory very quickly.
chudak 24 Posted July 11, 2021 Author Posted July 11, 2021 All true except RAM 2Gb no ramdisk Never see swap being used at all
Q-Droid 989 Posted July 11, 2021 Posted July 11, 2021 I could be misinterpreting the log but it looks maxed out to me. Maybe a bump in size could give it the headroom it needs. Jul 11 08:37:58 emby-vm kernel: [ 1738.528647] swap: usage 524288kB, limit 524288kB, failcnt 3635
chudak 24 Posted July 11, 2021 Author Posted July 11, 2021 I’ve been using this configuration for long time and don’t mind give it a boost but it’s something else I did upgrade pve to 7.0 maybe this but emby is being effected and it’s a reproducible case Dunno
Luke 42077 Posted July 11, 2021 Posted July 11, 2021 Try removing these plugins: 2021-07-11 12:35:44.671 Info App: Loading MediaBrowser.Plugins.SmtpNotifications, Version=3.1.6.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/MediaBrowser.Plugins.SmtpNotifications.dll 2021-07-11 12:35:44.671 Info App: Loading Addic7ed, Version=1.0.8.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Addic7ed.dll 2021-07-11 12:35:44.671 Info App: Loading statistics, Version=2.0.20.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Statistics.dll 2021-07-11 12:35:44.671 Info App: Loading Emby.DiagnosticsPlugin, Version=4.6.0.31, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Emby.DiagnosticsPlugin.dll Then restart the server and see how it compares.
chudak 24 Posted July 11, 2021 Author Posted July 11, 2021 (edited) 1 hour ago, Luke said: Try removing these plugins: 2021-07-11 12:35:44.671 Info App: Loading MediaBrowser.Plugins.SmtpNotifications, Version=3.1.6.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/MediaBrowser.Plugins.SmtpNotifications.dll 2021-07-11 12:35:44.671 Info App: Loading Addic7ed, Version=1.0.8.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Addic7ed.dll 2021-07-11 12:35:44.671 Info App: Loading statistics, Version=2.0.20.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Statistics.dll 2021-07-11 12:35:44.671 Info App: Loading Emby.DiagnosticsPlugin, Version=4.6.0.31, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Emby.DiagnosticsPlugin.dll Then restart the server and see how it compares. removed lots of plugins, see what I have left, the issue is still here, what’s your hypothesis? Edited July 11, 2021 by chudak
chudak 24 Posted July 11, 2021 Author Posted July 11, 2021 1 minute ago, Luke said: What issue exactly? That’s funny see my first post: “ When I try streaming a 4K live TV emby actually runs out of memory. Auch ! Never seen this before. It actually happens only if Chrome browser is used (not on Android app) and the errors are in /var/log/syslog: ==> /var/log/syslog <== Jul 11 08:37:58 emby-vm kernel: [ 1738.528575] out_of_memory+0x1cf/0x520 Jul 11 08:37:58 emby-vm kernel: [ 1738.528587] mem_cgroup_charge+0x8a/0x280 Jul 11 08:37:58 emby-vm kernel: [ 1738.528592] ? scan_shadow_nodes+0x30/0x30 Jul 11 08:37:58 emby-vm kernel: [ 1738.528597] pagecache_get_page+0x161/0x3b0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528602] ? alloc_set_pte+0xf6/0x690 Jul 11 08:37:58 emby-vm kernel: [ 1738.528608] __do_fault+0x3c/0xe0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528613] do_user_addr_fault+0x1a3/0x450 Jul 11 08:37:58 emby-vm kernel: [ 1738.528619] exc_page_fault+0x6c/0x150 Jul 11 08:37:58 emby-vm kernel: [ 1738.528626] asm_exc_page_fault+0x1e/0x30 Jul 11 08:37:58 emby-vm kernel: [ 1738.528633] Code: Unable to access opcode bytes at RIP 0x7fb889523016. Jul 11 08:37:58 emby-vm kernel: [ 1738.528637] RAX: ffffffffffffff92 RBX: 00007fb7dc003b98 RCX: 00007fb88951f7b1 Jul 11 08:37:58 emby-vm kernel: [ 1738.528640] RBP: 00007fb7dc003b88 R08: 0000000000000000 R09: 00000000ffffffff Jul 11 08:37:58 emby-vm kernel: [ 1738.528642] R13: 00007fb7dc003b60 R14: 00007fb7dc003bb0 R15: 00007fb880128c40 Jul 11 08:37:58 emby-vm kernel: [ 1738.528647] swap: usage 524288kB, limit 524288kB, failcnt 3635 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] anon 2104713216 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file 9191424 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] kernel_stack 2752512 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] pagetables 8650752 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] percpu 798336 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] sock 856064 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] shmem 135168 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_mapped 7974912 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_dirty 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_writeback 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] anon_thp 1038090240 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] file_thp 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] shmem_thp 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] inactive_anon 1031098368 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] active_anon 1092120576 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] inactive_file 5955584 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] active_file 6447104 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] unevictable 0 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab_reclaimable 4069784 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab_unreclaimable 6707120 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] slab 10776904 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_refault_anon 219516 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_refault_file 48675 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_activate_anon 175263 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_activate_file 27720 Jul 11 08:37:58 emby-vm kernel: [ 1738.528661] workingset_restore_anon 83622 Jul 11 08:37:58 emby-vm kernel: [ 1738.528664] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name Jul 11 08:37:58 emby-vm kernel: [ 1738.528670] [ 19083] 0 19083 660 29 45056 0 0 agetty Jul 11 08:37:58 emby-vm kernel: [ 1738.528675] [ 19264] 0 19264 9511 16 69632 106 0 master Jul 11 08:37:58 emby-vm kernel: [ 1738.528680] [ 19266] 102 19266 9591 0 69632 125 0 qmgr Jul 11 08:37:58 emby-vm kernel: [ 1738.528685] [ 19408] 102 19408 9580 18 69632 105 0 trivial-rewrite Jul 11 08:37:58 emby-vm kernel: [ 1738.528690] [ 19410] 102 19410 10527 193 73728 0 0 tlsmgr Jul 11 08:37:58 emby-vm kernel: [ 1738.528696] [ 18994] 105 18994 6653 223 77824 0 0 systemd-network Jul 11 08:37:58 emby-vm kernel: [ 1738.528701] [ 19054] 0 19054 58193 216 94208 0 0 accounts-daemon Jul 11 08:37:58 emby-vm kernel: [ 1738.528706] [ 19056] 100 19056 1897 163 57344 0 -900 dbus-daemon Jul 11 08:37:58 emby-vm kernel: [ 1738.528714] [ 20000] 998 20000 915712 432914 5115904 100714 0 ffmpeg Jul 11 08:37:58 emby-vm kernel: [ 1738.528719] [ 19060] 0 19060 6565 565 90112 1336 0 networkd-dispat Jul 11 08:37:58 emby-vm kernel: [ 1738.528724] [ 19170] 33 19170 14234 185 98304 351 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528729] [ 19172] 33 19172 14234 178 98304 348 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528734] [ 19174] 33 19174 14234 110 98304 383 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528738] [ 19176] 33 19176 14234 123 98304 370 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528742] [ 19178] 33 19178 14234 138 98304 355 0 nginx Jul 11 08:37:58 emby-vm kernel: [ 1738.528778] [ 19436] 0 19436 1584 125 53248 48 0 sudo Jul 11 08:37:58 emby-vm kernel: [ 1738.528783] [ 19438] 0 19438 642 20 40960 0 0 tail Jul 11 08:37:08 emby-vm systemd[1]: message repeated 15 times: [ Looping too fast. Throttling execution a little.] Jul 11 08:37:58 emby-vm systemd[1]: emby-server.service: A process of this unit has been killed by the OOM killer. “
Happy2Play 9780 Posted July 12, 2021 Posted July 12, 2021 How much free space is there? Is the /var/lib/emby/transcoding-temp folder full or have rogue remaining sessions?
CaffNoir 21 Posted July 12, 2021 Posted July 12, 2021 Hey ! Try disable "Enable hardware acceleration if possible" and try again, it's look like your server can't transcode 4K i think
chudak 24 Posted July 12, 2021 Author Posted July 12, 2021 19 minutes ago, CaffNoir said: Hey ! Try disable "Enable hardware acceleration if possible" and try again, it's look like your server can't transcode 4K i think That does not help and I said it’s only with pc chrome browser, and my h/w can transcode 4k, for example Roku client clearly does it Thx
chudak 24 Posted July 12, 2021 Author Posted July 12, 2021 30 minutes ago, Happy2Play said: How much free space is there? Is the /var/lib/emby/transcoding-temp folder full or have rogue remaining sessions? Space is not an issue, thx
CaffNoir 21 Posted July 12, 2021 Posted July 12, 2021 13 hours ago, chudak said: That does not help and I said it’s only with pc chrome browser, and my h/w can transcode 4k, for example Roku client clearly does it Thx Did u try on an other computer with a fresh chrome ?
chudak 24 Posted July 13, 2021 Author Posted July 13, 2021 I think the case I described above is extreme and actually demonstrated the problem in aggregate way However the problem exist when streaming a regular movie See the memory graph of regular streaming, when memory value goes does its when I restart Emby while streaming Any ideas?
chudak 24 Posted July 13, 2021 Author Posted July 13, 2021 On 7/11/2021 at 5:10 PM, Happy2Play said: How much free space is there? Is the /var/lib/emby/transcoding-temp folder full or have rogue remaining sessions? I actually have no files there .
Happy2Play 9780 Posted July 13, 2021 Posted July 13, 2021 2 minutes ago, chudak said: I actually have no files there . You should only have files there during that transcode session. So if it is empty then there should be a issue there as the sessions are being cleaned up properly. from your previous log /var/lib/emby/transcoding-temp/31980F_%d.ts
XcOM9876 9 Posted July 13, 2021 Posted July 13, 2021 Does it use all the RAM regardless what 4k file you transcode? or only some, I just checked my server and it peaks at 3.2GB RAM usage and normally likes to sit around 2.5GB usage, I'd say boosting your swap would help given the recommended swap size is 2x your RAM when using 2GB or less, equal your RAM up to 8GB
chudak 24 Posted July 13, 2021 Author Posted July 13, 2021 Update 1. emby had problems and indeed ran out of memory streaming a specific 4K live TV stream, hmm not much more, maybe stream is bad or else, who knows ! Probably is not worth investigating ATM. 2. Proxmox starting with version 7.0 shows memory usage differently on WebUI for LXC and IMHO incorrectly, e.g. WebUI shows 100% use when in fact "free -m" shows memory use correctly as ~20% used. I've tested emby server running several streams simultaneously with 100% used (as reported by Porxmox) and Emby had no problems streaming 3 videos.
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