January 28, 201214 yr The library and tmp directory are probably being scanned by Plex regularly. Unless you can stop plex before invoking the sleep you are probably out of luck. Ok, I will change the sleep scritp to check if clients are still online -> No -> stop PMS -> go to sleep. As I am fairly new to this: Is there a way to automatically start the PMS on wake up?
January 28, 201214 yr The library and tmp directory are probably being scanned by Plex regularly. Unless you can stop plex before invoking the sleep you are probably out of luck. Are you sure. I have Plex installed to a drive that isn't part of unRAID, and this is what I have right now: root@The-Vault:/boot/config# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 2.0G 76M 1.9G 4% /boot /dev/hda1 20G 601M 19G 4% /mnt/Static /dev/md2 1.9T 828G 1.1T 45% /mnt/disk2 /dev/md1 1.9T 766G 1.1T 42% /mnt/disk1 /dev/md3 1.9T 673G 1.2T 37% /mnt/disk3 shfs 5.5T 2.3T 3.3T 41% /mnt/user root@The-Vault:/boot/config# ls -l /mnt/Static/ total 3 drwxr-xr-x 9 root root 256 2012-01-28 13:11 Plex\ Media\ Server/ lrwxrwxrwx 1 root root 32 2011-12-09 13:43 PlexMediaServer -> PlexMediaServer-0.9.5.2-7a18da4// drwxr-xr-x 3 eddie 1000 1992 2011-12-09 13:42 PlexMediaServer-0.9.5.1-56298e9/ drwxr-xr-x 3 eddie users 1616 2011-11-29 01:03 PlexMediaServer-0.9.5.2-7a18da4/ drwxrwxrwt 2 root root 48 2012-01-28 13:40 Temp/ root@The-Vault:/boot/config# hdparm -C /dev/hda1 /dev/hda1: drive state is: standby Cheers.
January 29, 201214 yr curious whether anyone is using plex to stream to remote clients (http://wiki.plexapp.com/index.php/ConfigurePortForward)? I'm sure i've seen talk about unraid not really being designed to be open to the internet... but still, being able to stream stuff during my lunchbreak at work would be pretty cool! The newest version of PMS is absolutely made for remote streaming, a la MyPlex. With PMS running on my unRAID, I have shared my library with 3 other people running Plex Media Center--one in another country. I also regularly view my media while on business trips from my MacBook, iPad and iPhone (though I'm not the biggest fan of watching video on my iPhone). It's all very seamless. In fact, the newest beta of Plex for ATV2 even has MyPlex support. Oh, and you don't even need to fool with port forwarding.
February 1, 201214 yr After Plex is installed, there is a nive Plex icon and what then? How do you invoke Plex and what can you do with it?
February 1, 201214 yr Go to http://<unraid ip or host name>:32400/manage From there you can configure, set your media directories, etc.
February 1, 201214 yr Sorry if this has already been asked, but searches have come up empty. I'm using this plugin and suffering from the memory leak/crash issue - every 4 or 5 days. Could someone help me with a cron script to get PMS to restart every night? I don't know how to stop/start plex from the command line.. what commands is the web gui sending? I suspect this has been asked somewhere before, so a link would be great as well. Thanks a lot! Cheers, whiteatom
February 1, 201214 yr If you're using this plugin, the only reason you'd experience the leak and crash is if you're using any folders with a leading period (e.g, ".foldername"). Change your paths and you'll be fine. Can't really help to the cronjob, though you may be able to look at Stokkes' package to see how he did it.
February 2, 201214 yr I am using this plugin... And I changed the paths so nothing has a . And I do still have the issue. I thought this was plex in general, not plugin specific?? whiteatom
February 3, 201214 yr For whatever reason, PMS and unRAID did exhibit an issue where the process grew until it exceeded all physical memory and crashed. Spidi managed to track down the cause, which was (IIRC) a combination of avoiding folders with a leading period as well as running the process as its own user (which this plugin does). I have not experienced any crashing using this plugin, with my server uptime being in the weeks. It will grow, but it typically levels off for me around 450 MB. Your 4 gigs of RAM should be plenty... I wonder why you're still experiencing the crash. What else are you running?
February 3, 201214 yr Hello everyone. I have a little problem with the Plex server installed on my Unraid Server. Granted that the update of the libraries is done manually, every time I launch the libraries update this is not start. I'm forced to stop and restart the server Plex, so I can start updating libraries. Any help? (Sorry for my bad english )
February 7, 201214 yr I'd love to know the same thing. I'm going to watch the memory more closely and see if that is the issue, or maybe something else is causing it. I have been careful to avoid '.' in my paths, and as you said, this is running under a different users. The box is running, SABnzbd, CouchPotato, SickBeard, and PMS on UnRaid.. none of it working that hard. What would I see in which log file if this memory leak is the reason for the crash? Where should I look to trouble shoot this further? I do notice in the process list that the PMS is listed as ./Plex Media Server, is that ./ causing a problem? Cheers, and thanks for the reply. whiteatom For whatever reason, PMS and unRAID did exhibit an issue where the process grew until it exceeded all physical memory and crashed. Spidi managed to track down the cause, which was (IIRC) a combination of avoiding folders with a leading period as well as running the process as its own user (which this plugin does). I have not experienced any crashing using this plugin, with my server uptime being in the weeks. It will grow, but it typically levels off for me around 450 MB. Your 4 gigs of RAM should be plenty... I wonder why you're still experiencing the crash. What else are you running?
February 7, 201214 yr @ Flavio, I'm not sure I understand what the issue is. Are you saying that you can only manually update your library once, then have to restart in order to kick off another? If that's the case, something is hanging your library update. Have you checked permissions on your media files? They should all be owned by nobody:users. I haven't personally encountered your problem... Perhaps you may want to try temporarily pointing your library path somewhere else and start fresh to see if that fixes the problem. @ whiteatom, Yeah, your add-ons should be fine with 4 GB. How are you seeing the "./Plex..." ? I don't think that would be the issue (the ./ just means current directory), however I have never seen it display this way in my process list. I'd definitely keep an eye on it and see how big its getting. If you're seeing it exceed the 1 GB mark, then you probably have a leak. When I had that issue, it would crash when it would get to about 3.5 GB...
February 8, 201214 yr @ Flavio, I'm not sure I understand what the issue is. Are you saying that you can only manually update your library once, then have to restart in order to kick off another? If that's the case, something is hanging your library update. Have you checked permissions on your media files? They should all be owned by nobody:users. I haven't personally encountered your problem... Perhaps you may want to try temporarily pointing your library path somewhere else and start fresh to see if that fixes the problem. Thank's for your reply, I try to explain better. In library settings I selected not to update automatically: The problem is that when I start manually, the update of the library don't start, I must stop and restart the server Plex, so the library update is successful.
February 10, 201214 yr @ whiteatom, Yeah, your add-ons should be fine with 4 GB. How are you seeing the "./Plex..." ? I don't think that would be the issue (the ./ just means current directory), however I have never seen it display this way in my process list. I'd definitely keep an eye on it and see how big its getting. If you're seeing it exceed the 1 GB mark, then you probably have a leak. When I had that issue, it would crash when it would get to about 3.5 GB... Yes, I am seeing the leak. It seems to get a lot worse when I'm adding things. It was a once every 10 days problem, but I added a bunch of shows through sickbeard and sabnzbd was working all night. By the next morning (maybe 35 hours after a restart) Plex had stopped responding and was taking up 3.2 GB. I have added a script that restarts it daily and all is well. For those interested... Plex Restart Script in /boot/custom/restartPlex.sh (where ever you want on your Flash drive) #!/bin/sh logger "Stopping Plex for nightly restart." /etc/rc.d/rc.plex stop sleep 15 logger "Restarting Plex by cron script." /etc/rc.d/rc.plex start in /boot/config/go add cp /boot/custom/restartPlex.sh /etc/cron.daily/ BTW, /etc/rc.d/rc.plex restart doesn't seem to work. It takes too long to shut down and the start portion just responds that plex is already running, and a few seconds later, Plex stops. Cheers, whiteatom
February 10, 201214 yr Thank's for your reply, I try to explain better. In library settings I selected not to update automatically: The problem is that when I start manually, the update of the library don't start, I must stop and restart the server Plex, so the library update is successful. Flavio, I'm not 100% sure I understand your issue either. Here are a few interpretations I see of what you are saying... 1. when you start plex manually it's not updating, so you need to stop and start it again to get a library update. The library update won't occur when you start Plex as you have all the update options disabled. You can trigger a manual update by clicking the circular arrow on the bottom right of web interface for the PMS. 2. when you start a library update manually, it won't do it until you stop and start Plex. If this is the case, then Plex is running into trouble when updating your library. Like kaiguy said, this is often related to Plex not being able to access the media files. Check the users (chown) and the permissions (chmod) of all your media files. I'd also suggest you look at the Media Scanner log file and the syslog to see if there are any errors showing up that might help you solve this. Good luck, whiteatom
February 13, 201214 yr Ok.. I'm hoping someone can confirm this is the memory leak issue, not just me needing more ram. I had the segfault error on emhttp, so I rebooted.. and my plexdb was corrupt.. and now I'm trying to rebuild it and it just keeps crashing with an error that looks like this in the syslog: Feb 13 07:45:31 knox plex-rc.plex: Plex Media Server IS running Feb 13 07:46:35 knox kernel: Plex Media Scan invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0, oom_score_adj=0 Feb 13 07:46:35 knox kernel: Pid: 6296, comm: Plex Media Scan Not tainted 3.1.0-unRAID #2 Feb 13 07:46:35 knox kernel: Call Trace: Feb 13 07:46:35 knox kernel: [<c105cd63>] T.582+0x55/0x15f Feb 13 07:46:35 knox kernel: [<c119b6fb>] ? ___ratelimit+0xaf/0xc4 Feb 13 07:46:35 knox kernel: [<c105ce9c>] T.581+0x2f/0x108 Feb 13 07:46:35 knox kernel: [<c102fb9d>] ? has_capability_noaudit+0x18/0x21 Feb 13 07:46:35 knox kernel: [<c105d172>] out_of_memory+0x1fd/0x283 Feb 13 07:46:35 knox kernel: [<c105fc3b>] __alloc_pages_nodemask+0x3f8/0x47f Feb 13 07:46:35 knox kernel: [<c106c4c2>] do_anonymous_page+0x103/0x21c Feb 13 07:46:35 knox kernel: [<c106d220>] handle_pte_fault+0x83/0x20f Feb 13 07:46:35 knox kernel: [<c103ff3c>] ? sched_clock_cpu+0x3f/0x140 Feb 13 07:46:35 knox kernel: [<c106d809>] handle_mm_fault+0x138/0x14a Feb 13 07:46:35 knox kernel: [<c101b09a>] ? mm_fault_error+0x129/0x129 Feb 13 07:46:35 knox kernel: [<c101b3b1>] do_page_fault+0x317/0x332 Feb 13 07:46:35 knox kernel: [<c10316c6>] ? update_process_times+0x53/0x58 Feb 13 07:46:35 knox kernel: [<c102c82d>] ? irq_exit+0x32/0x53 Feb 13 07:46:35 knox kernel: [<c101b09a>] ? mm_fault_error+0x129/0x129 Feb 13 07:46:35 knox kernel: [<c130b732>] error_code+0x5a/0x60 Feb 13 07:46:35 knox kernel: [<c101b09a>] ? mm_fault_error+0x129/0x129 Feb 13 07:46:35 knox kernel: Mem-Info: Feb 13 07:46:35 knox kernel: DMA per-cpu: Feb 13 07:46:35 knox kernel: CPU 0: hi: 0, btch: 1 usd: 0 Feb 13 07:46:35 knox kernel: CPU 1: hi: 0, btch: 1 usd: 0 Feb 13 07:46:35 knox kernel: CPU 2: hi: 0, btch: 1 usd: 0 Feb 13 07:46:35 knox kernel: CPU 3: hi: 0, btch: 1 usd: 0 Feb 13 07:46:35 knox kernel: Normal per-cpu: Feb 13 07:46:35 knox kernel: CPU 0: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 1: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 2: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 3: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: HighMem per-cpu: Feb 13 07:46:35 knox kernel: CPU 0: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 1: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 2: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: CPU 3: hi: 186, btch: 31 usd: 0 Feb 13 07:46:35 knox kernel: active_anon:62331 inactive_anon:28 isolated_anon:0 Feb 13 07:46:35 knox kernel: active_file:182 inactive_file:141 isolated_file:0 Feb 13 07:46:35 knox kernel: unevictable:910421 dirty:0 writeback:0 unstable:0 Feb 13 07:46:35 knox kernel: free:30283 slab_reclaimable:16374 slab_unreclaimable:3410 Feb 13 07:46:35 knox kernel: mapped:6309 shmem:40 pagetables:639 bounce:0 Feb 13 07:46:35 knox kernel: DMA free:15820kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15772kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:64kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes Feb 13 07:46:35 knox kernel: lowmem_reserve[]: 0 869 4030 4030 Feb 13 07:46:35 knox kernel: Normal free:104912kB min:3736kB low:4668kB high:5604kB active_anon:26844kB inactive_anon:0kB active_file:728kB inactive_file:564kB unevictable:600816kB isolated(anon):0kB isolated(file):0kB present:890008kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:65432kB slab_unreclaimable:13640kB kernel_stack:2240kB pagetables:172kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:114341 all_unreclaimable? yes Feb 13 07:46:35 knox kernel: lowmem_reserve[]: 0 0 25292 25292 Feb 13 07:46:35 knox kernel: HighMem free:400kB min:512kB low:3908kB high:7308kB active_anon:222480kB inactive_anon:112kB active_file:0kB inactive_file:0kB unevictable:3040868kB isolated(anon):0kB isolated(file):0kB present:3237436kB mlocked:0kB dirty:0kB writeback:0kB mapped:25232kB shmem:160kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:2384kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:26 all_unreclaimable? yes Feb 13 07:46:35 knox kernel: lowmem_reserve[]: 0 0 0 0 Feb 13 07:46:35 knox kernel: DMA: 1*4kB 1*8kB 0*16kB 0*32kB 3*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB = 15820kB Feb 13 07:46:35 knox kernel: Normal: 21998*4kB 1777*8kB 17*16kB 4*32kB 0*64kB 2*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 104912kB Feb 13 07:46:35 knox kernel: HighMem: 100*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 400kB Feb 13 07:46:35 knox kernel: 910784 total pagecache pages Feb 13 07:46:35 knox kernel: 0 pages in swap cache Feb 13 07:46:35 knox kernel: Swap cache stats: add 0, delete 0, find 0/0 Feb 13 07:46:35 knox kernel: Free swap = 0kB Feb 13 07:46:35 knox kernel: Total swap = 0kB Feb 13 07:46:35 knox kernel: 1310704 pages RAM Feb 13 07:46:35 knox kernel: 1082370 pages HighMem Feb 13 07:46:35 knox kernel: 276339 pages reserved Feb 13 07:46:35 knox kernel: 25129 pages shared Feb 13 07:46:35 knox kernel: 996697 pages non-shared Feb 13 07:46:35 knox kernel: [ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name Feb 13 07:46:35 knox kernel: [ 726] 0 726 588 243 3 -17 -1000 udevd Feb 13 07:46:35 knox kernel: [ 1064] 0 1064 477 153 2 0 0 syslogd Feb 13 07:46:35 knox kernel: [ 1068] 0 1068 464 98 3 0 0 klogd Feb 13 07:46:35 knox kernel: [ 1094] 0 1094 511 138 3 0 0 dhcpcd Feb 13 07:46:35 knox kernel: [ 1186] 1 1186 490 120 2 0 0 rpc.portmap Feb 13 07:46:35 knox kernel: [ 1190] 0 1190 527 197 0 0 0 rpc.statd Feb 13 07:46:35 knox kernel: [ 1200] 0 1200 475 135 1 0 0 inetd Feb 13 07:46:35 knox kernel: [ 1207] 0 1207 2039 721 3 0 0 ntpd Feb 13 07:46:35 knox kernel: [ 1214] 0 1214 466 158 2 0 0 acpid Feb 13 07:46:35 knox kernel: [ 1225] 81 1225 619 211 2 0 0 dbus-daemon Feb 13 07:46:35 knox kernel: [ 1230] 0 1230 477 145 0 0 0 crond Feb 13 07:46:35 knox kernel: [ 1232] 0 1232 475 73 0 0 0 atd Feb 13 07:46:35 knox kernel: [ 8373] 0 8373 13471 390 3 0 0 emhttp Feb 13 07:46:35 knox kernel: [ 8858] 0 8858 694 353 3 0 0 unraid_notify Feb 13 07:46:35 knox kernel: [ 8859] 0 8859 464 132 3 0 0 agetty Feb 13 07:46:35 knox kernel: [ 8860] 0 8860 464 133 1 0 0 agetty Feb 13 07:46:35 knox kernel: [ 8861] 0 8861 464 134 2 0 0 agetty Feb 13 07:46:35 knox kernel: [ 8862] 0 8862 464 133 0 0 0 agetty Feb 13 07:46:35 knox kernel: [ 8863] 0 8863 464 134 2 0 0 agetty Feb 13 07:46:35 knox kernel: [ 8864] 0 8864 464 132 2 0 0 agetty Feb 13 07:46:35 knox kernel: [12102] 0 12102 524 200 2 0 0 in.telnetd Feb 13 07:46:35 knox kernel: [12103] 0 12103 1076 433 3 0 0 bash Feb 13 07:46:35 knox kernel: [12172] 0 12172 544 148 0 0 0 tail Feb 13 07:46:35 knox kernel: [18321] 0 18321 524 198 0 0 0 in.telnetd Feb 13 07:46:35 knox kernel: [18322] 0 18322 1112 471 0 0 0 bash Feb 13 07:46:35 knox kernel: [20614] 0 20614 2297 491 0 0 0 nmbd Feb 13 07:46:35 knox kernel: [20616] 0 20616 3953 940 0 0 0 smbd Feb 13 07:46:35 knox kernel: [20621] 0 20621 3953 481 3 0 0 smbd Feb 13 07:46:35 knox kernel: [20628] 61 20628 740 400 2 0 0 avahi-daemon Feb 13 07:46:35 knox kernel: [20629] 61 20629 707 96 2 0 0 avahi-daemon Feb 13 07:46:35 knox kernel: [20637] 0 20637 506 130 2 0 0 avahi-dnsconfd Feb 13 07:46:35 knox kernel: [20870] 0 20870 587 212 2 -17 -1000 udevd Feb 13 07:46:35 knox kernel: [20871] 0 20871 587 197 1 -17 -1000 udevd Feb 13 07:46:35 knox kernel: [20967] 0 20967 14912 1391 3 0 0 shfs Feb 13 07:46:35 knox kernel: [21014] 0 21014 1100 267 3 0 0 cnid_metad Feb 13 07:46:35 knox kernel: [21017] 0 21017 1464 449 2 0 0 afpd Feb 13 07:46:35 knox kernel: [21649] 0 21649 2372 504 0 0 0 afpd Feb 13 07:46:35 knox kernel: [21769] 0 21769 2373 507 1 0 0 afpd Feb 13 07:46:35 knox kernel: [21936] 99 21936 53592 5584 3 0 0 python Feb 13 07:46:35 knox kernel: [22439] 99 22439 56036 9990 1 0 0 python Feb 13 07:46:35 knox kernel: [26006] 0 26006 47358 5059 2 0 0 python Feb 13 07:46:35 knox kernel: [ 5406] 0 5406 4102 1096 0 0 0 smbd Feb 13 07:46:35 knox kernel: [ 6013] 999 6013 61315 9269 0 0 0 Plex Media Serv Feb 13 07:46:35 knox kernel: [ 6044] 999 6044 23091 6748 1 0 0 python Feb 13 07:46:35 knox kernel: [ 6075] 999 6075 15117 4908 0 0 0 python Feb 13 07:46:35 knox kernel: [ 6077] 999 6077 14692 5283 3 0 0 python Feb 13 07:46:35 knox kernel: [ 6291] 0 6291 463 61 0 0 0 sleep Feb 13 07:46:35 knox kernel: [ 6293] 999 6293 23420 9222 3 0 0 Plex Media Scan Feb 13 07:46:35 knox kernel: [ 6309] 0 6309 615 267 1 0 0 top Feb 13 07:46:35 knox kernel: [ 6327] 999 6327 16076 5648 0 0 0 python Feb 13 07:46:35 knox kernel: [ 6349] 999 6349 16110 5729 2 0 0 python Feb 13 07:46:35 knox kernel: [ 6376] 999 6376 16312 5125 3 0 0 python Feb 13 07:46:35 knox kernel: Out of memory: Kill process 22439 (python) score 9 or sacrifice child Feb 13 07:46:35 knox kernel: Killed process 22439 (python) total-vm:224144kB, anon-rss:36828kB, file-rss:3132kB is this the memory leak? can someone give me some idea how to solve this? I have no dots in any of the paths..... whiteatom
February 16, 201214 yr Im using unRAID 5.0b13 and the newest version of this plugin and having a slight issue. When i first start plex, my webgui is unresponsive for a few minutes, but eventually comes back. If i leave plex running, i eventually lose the webgui and have to restart. Any idea what is causing this? I have been just stopping plex after i am done watching things for the day or every couple days, but would like to just leave it running. It seems like its usually about 5-7 days before i lose the webgui. Also, once i lose the webgui, is there any way to stop and start it to see if i can get it back that way without shutting down the box? Thanks! One more note, when i lose the webgui, i can still access unMENU.
March 5, 201214 yr Yeah that was fast. Going to get this installed when I get home tonight. Looking forward to seeing if this fixes some of the problems I've been having with the transcoder crashing. Anyone else been having problems with this? Here's a link to plex forums regarding this. http://forums.plexapp.com/index.php/topic/38389-plex-transcoder-error-plex-requires-restart/page__pid__243806#entry243806
March 5, 201214 yr Haven't had a problem since two releases back... Had it running smooth for several days without a hitch.
March 5, 201214 yr The latest release (prior to today's) was still crashing all the time for me (at least once-twice a day). Streaming primarily to Plex on a Mac mini (and very rarely to an iPad).
Archived
This topic is now archived and is closed to further replies.