So - I've had this problem with Plex Server since I upgraded from SL to ML. If I don't touch my MBP, the server seems to shut down about 30-40 minutes into a show/film. (If I periodically use the mac, then the server doesn't shut off).
I thought I'd solve it by using Caffeinate to start PMS via an alias in my .bashrc thus:
alias plex='caffeinate -i open -W -a "Plex Media Server.app" &'
but that doesn't solve the issue.
Computer sleep is set to 3 minutes, display to 2 minutes, so that doesn't correspond to the PMS shutting down. Reading around the subject, ML does a lot more process shutting down in the background *I think*, that SL never did.
What should I be looking for in the Plex Media Server.log file to try and ascertain the problem, as they're large.
Investigating this, I suspect what is happening is this:
I use caffeinate to stop Plex Media Server from sleeping - however, it starts a child process called Plex DLNA server (which I suspect is the one that breaks when ML puts itself to sleep.) I have not been able to disengage the starting of this process from Plex Media Server; I have found the seperate executables, but I guess DLNA is started within the Media Server exe.
So have two avenues of attack:
1) See if the niceness level of the process affects this - will set niceness level to -20 - not sure if ML will still put it to sleep.
2)The other option is to start Plex Media Server exe, kill it's DLNA server process and start the DLNA server process manually with caffienate.
I have the Plex Media server running on my mac; the dlna server is running as a companion to this, also on my mac.
I have the Plex client app running on my Samsung.
So if I set the DLNA component to off, that would remove that process. (I was under the mistaken belief that that was necessary, which has sent me on a wild goose chase) - but you're saying that it doesn't use it anyway.
So I'm back to the original problem - of the PMS being forced into sleep by ML, despite being started under caffeinate.
I have the Plex Media server running on my mac; the dlna server is running as a companion to this, also on my mac.
I have the Plex client app running on my Samsung.
So if I set the DLNA component to off, that would remove that process. (I was under the mistaken belief that that was necessary, which has sent me on a wild goose chase) - but you're saying that it doesn't use it anyway.
So I'm back to the original problem - of the PMS being forced into sleep by ML, despite being started under caffeinate.
So my mac goes to sleep when it's sitting around on the floor streaming the ol' content. It does this for a while, and then conks out, as stated previously. After spending a bit of time with the Plex Media Server logs (not very reader friendly, has to be said), the errors seemed to be bitching about losing network address.
pmset is to change power mgt settings, and there are more options available than there is in the GUI settings - so I'm going to try this:
sudo pmset -a standby 0
Will wait and see...
The theory goes that although I have 'Wake for network access' checked in my power settings, it requires a kick from something on the network running Bonjour to then tell the mac to wake it's network up. I do not have a device that does this. Changing the standy param might do the trick...
I'm using an iMac as my server with an external disk storing my movies. I have upgraded to Mavericks. I watch movies from my iPad using a hdmi hooked up to my flat screen TV.
I was having the same problem with the Plex server stopping about every 15 min. In System preferences, under energy saver, I had Computer sleep at 15 min. and checked Put hard disks to sleep when possible and Wake for network access. I made several changes to this configuration with no solution. I finally set Computer sleep to Never and it solved the problem.
For some reason the Wake for network access didn't work.
Yeh, however, I have a laptop, so I want it to sleep sometimes. iMac is always connected, so I suppose it's not as critical. Standby param is linked to hibernatemode parameter - if you set hibernatemode to 0 (means don't copy memory to disk, essential with an SSD to stop it being used unnecessarily) then you get instant wake.
So with the sleep set at 10 minutes or so, I used to get the video cutting out. Setting standby to 0 seems to have cured this.
Wake for network access only works if triggered by a bonjour agent on the network, such as an airplay router.
Standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period (see man pages for more details).
Standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period (see man pages for more details).
The command:
sudo pmset -a standby 0
This disables that feature.
Okay so I typed this into terminal and I am testing it now. How do I reverse it if necessary? Just substitute the "0" for a "1".
Is there a way to restore to default pmset. i.e. restored to what it was before I started medalling in Terminal?
Thanks for your reply. Does it make a difference if my library is stored on an external HDD connected to my Mac via usb?
It seemed to be working for me yesterday but after moving my files from the Mac’s HDD to an external it’s not staying awake.
I tested this watching an episode of a tv show. When the show ended I had to go upstairs to my computer and wake it with the touch pad to be able to select the next episode.