I have started experiencing frequent power outages to the point where my UPS can’t keep up. Now I need to play tech support for my family multiple times a day as they can’t use Plex after an outage. Yes, I’m looking to increase the reliability of my power supply, but I’d also like to point out that I am very much looking forward to a version of Plex on QNAP that starts up properly after even an ungrafecul shut down. Thanks so much to the developers supporting the ecosystem! Your effort is much appreciated!
When folks are back (Monday) , I will find out what happened with this not being included as part of the release.
Please confirm for me that the updated script does function?
It should tell you if it’s recovering from a crash in the QNAP system logs
This is the critical region I added
# Pid file was present but no process present. PMS crashed so confirm clean or do a cleanup.
Pids="$(ps -ef | grep $QPKG_DIR | awk '{print $1}')"
if [ "$Pids" != "" ]; then
LogMessage="Plex Media Server is recovering from previous crash. Please standby."
echo $LogMessage
log_tool -t 0 -a "$LogMessage"
# Cleanup each dangling process
for i in $Pids
do
Count=5; Signal=-15
while [ $Count -gt 0 ] && [ -e /proc/$i ]
do
kill $Signal $i
sleep 3
Count=$((Count - 1))
[ $Signal -eq -15 ] && Signal=-9
[ $Signal -eq -9 ] && Signal=-11
done
# if loop finishes and still have pid, it's stuck and we stop here
if [ -e /proc/$i ]; then
LogMessage="Error: PlexMediaServer: Stuck process (pid) $i. PlexMediaServer cannot start."
log_tool -t 1 -a "$LogMessage"
echo $LogMessage
fi
done
fi
I’ve pressed Engineering to release it (The internal process got changed in March and this fell in the crack )
Please continue to use my script above for now. I’ll make certain it’s released in the next.
the new script worked fine on my end (in contrast to the old script which would 100% fail after a power outage). but i guess more widespread testing before shipping couldn’t hurt.
Does the PlexData shared folder still work for you?
Can you:
Using FileStation, Click PlexData → Plex Media Server and end up in the real Plex Media Server directory where you can do addition things like make a ZIP of the Logs directory ? (You must be admin not administrative user)
While in the “Plex Media Server” directory, highlight everything and make your backups -OR- restore from backups?
( You cannot backup from the “PlexData” level. This will not work)
PlexData doesn’t show up for me in FileStation on QTS 5.1.7 and i can’t find it via SSH either:
[/] # find / -name PlexData
find: /proc/14758: No such file or directory
find: /proc/14759: No such file or directory
find: /proc/14760: No such file or directory
find: /proc/14762: No such file or directory
find: /proc/14787: No such file or directory
find: /proc/14796: No such file or directory
find: /proc/14808: No such file or directory
[/] #