I´m pretty sure that's the problem here, I´m running it every minute. I´m gonna change it to 10-15m intervals and see what it does, thanks guys for the input.
Just make sure you still run the "plexWatch.pl --notify" every minute ( same as running plexWatch.pl without any args ). Let us know the outcome. Hope we nailed it.
You are not setting the path correctly for your database file. I think the easiest way to find this would be to ssh into your Synology Diskstation and physically look for the file. I'm running a VM of DSM4.1 currently and the path to my database file where I'm testing is:
/volume1/web/plexWatch/db/plexWatch.db
Your path will differ since you are using Cloudstation but it is possible to sync the web folder with Cloudstation if you wanted. Just do a quick browse via ssh to find the location of your database file and then issue a "pwd" command to get the full path location.
Ok so cloudstation is not working for me. It will simply stop syncing my plexWatch.db file after a few hours. Does anyone know of a way to edit the config.ini to point to another server or another way to automate the copy of plexwatch.db to the synology every 60 seconds or so? I really would prefer the former, but will settle for the latter. Just to be clear, PlexWatchWeb is running on my Synology DS and PlexWatch is running on my MacMini.
Just make sure you still run the "plexWatch.pl --notify" every minute ( same as running plexWatch.pl without any args ). Let us know the outcome. Hope we nailed it.
I´m not getting the locked error anymore, but I´m still getting this error from time to time.
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\plexWatchWeb\charts.php on line 110
Could this simple be because of my database size? I´m generating about 1500-2000 plays per month, if that has any effect.
Confused on setting this up.. I have PMS running on the iMac (OS X Mavericks) and plexWatch/Web running on a FreeBSD 8.1 box with apache 2.2 and php5.5 (all dependencies).
I have plexWatch running and appears to be working.. I have a launchd that runs just a --notify every 30 seconds. I tested watching a few videos and my plexWatch.db has entries in it for the videos I watched. I didn't change much in the config.pl file for this, just using file notification only. It does seem to be working as I do have entries in the db and when I run --watched, I see the videos print out on the command line.
Notifications:
## Notification Options
$notify = {
'file' => {
'enabled' => 1, ## 0 or 1 - set to 1 to enable File Logging
'filename' => "$data_dir/plexWatch.log", ## default is plexWatch.log
'push_watched' => 1, ## added this myself .. do i need to add other pushes?
},
I have plexWatchWeb running as well, but it doesn't appear to be seeing anything. There is nothing on the home page, nothing in the hourly,daily,monthly stats, and nothing in users or charts.
Confused on setting this up.. I have PMS running on the iMac (OS X Mavericks) and plexWatch/Web running on a FreeBSD 8.1 box with apache 2.2 and php5.5 (all dependencies).
I have plexWatch running and appears to be working.. I have a launchd that runs just a --notify every 30 seconds. I tested watching a few videos and my plexWatch.db has entries in it for the videos I watched. I didn't change much in the config.pl file for this, just using file notification only. It does seem to be working as I do have entries in the db and when I run --watched, I see the videos print out on the command line.
Notifications:
## Notification Options
$notify = {
'file' => {
'enabled' => 1, ## 0 or 1 - set to 1 to enable File Logging
'filename' => "$data_dir/plexWatch.log", ## default is plexWatch.log
'push_watched' => 1, ## added this myself .. do i need to add other pushes?
},
I have plexWatchWeb running as well, but it doesn't appear to be seeing anything. There is nothing on the home page, nothing in the hourly,daily,monthly stats, and nothing in users or charts.
Thought I would add this in for people on a windows box running PlexWatch.
I modified the vbs scripts so I can run them once, and they will continue to run without creating a task or a cron job for them. I've also added them to my startup file so in the event I reboot my server they restart automatically.
(Change 60 to 30 if you want it every 30 seconds instead of every 60 seconds)
plexWatchNotify.vbs
do
WScript.slee(60 * 1000)
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run "C:\plexWatch\plexWatch.exe --notify", 0, True
Set WshShell = Nothing
loop
plexWatchRecentlyAdded.vbs
do
WScript.slee(60 * 1000)
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run "C:\plexWatch\plexWatch.exe --recently_added=tv,movie", 0, True
Is the IP address of your PMS Mavericks box 192.168.1.1 and is port 32400 not blocked by any firewall?
Are you somehow ( ssh, ftp, etc) placing the plexWatch database file to /opt/plexWatch/ on your FreeBSD server like you have it set in config.php?
Is that folder and file readable by your web server user?
Check your apache error logs for more information.
No firewall internally (everything is on the same LAN)
Yes, you caughtt me .. I'm running plexWatch on the iMac (where the PMS is running - at 192.168.1.1). I am then rsync'ing over my plexWatch folder including plexWatch.db over to /opt/plexWatch on the freeBSD box where I am running apache. I had hoped I could run plexWatchWeb separately so that it doesn't interfere with plexConnect which runs on the iMac.
No firewall internally (everything is on the same LAN)
Yes, you caughtt me .. I'm running plexWatch on the iMac (where the PMS is running - at 192.168.1.1). I am then rsync'ing over my plexWatch folder including plexWatch.db over to /opt/plexWatch on the freeBSD box where I am running apache. I had hoped I could run plexWatchWeb separately so that it doesn't interfere with plexConnect which runs on the iMac.
iMac - OSX Mavericks (192.168.1.1)
PMS
plexConnect
plexWatch
+ rsync plexWatch every 60 seconds over to freeBSD 8.1 server
freeBSD 8.1 server (192.168.1.3)
plexWatchWeb (/opt/plexWatch - dir is 777 permissions. plexWatch.db is 644 permissions).
apache
Hmm.. looks like json may not have loaded by default on my php5.5 so I installed it.. now just getting the simplexml_load errors, but can't figure out yet how to enable it.
Hmm.. Still getting this error randomly, despite having changed the interval of both plexWatch.exe and plexWatch.exe --notify to 5 and 10 minutes.
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\plexWatchWeb-dev\index.php on line 84
Can't really figure out why this is happening. Are there any performance tweaks I should be looking into with xampp?
What version are you using? v1.4.0?
Line 84 from index.php loads the XML results from your PMS server checking for currently playing streams. Do you experience any delays when browsing to that url?
Line 84 from index.php loads the XML results from your PMS server checking for currently playing streams. Do you experience any delays when browsing to that url?
How are your resources looking on your PMS server when this occurs?
Hmm, that url doesn't work, perhaps just in a linux setup? If you're referring to the now playing subpage it's http://pmsip:32400/web/index.html#!/nowplaying - But no, that page always loads near instantly, regardless of resource usage, 5-15 users streaming, doesn't matter. There doesn't seem to be any pattern if this occurs more when then server is under load, but just to be sure I´m gonna monitor that specially, will keep you posted :)
Edit: Oh, this happens with both v.1.4.0 and the 1.5.0.3 dev I´m running on the side (liking those stats!)
Hmm, that url doesn't work, perhaps just in a linux setup? If you're referring to the now playing subpage it's http://pmsip:32400/web/index.html#!/nowplaying - But no, that page always loads near instantly, regardless of resource usage, 5-15 users streaming, doesn't matter. There doesn't seem to be any pattern if this occurs more when then server is under load, but just to be sure I´m gonna monitor that specially, will keep you posted :)
No, the URL is correct. Odd that it's not loading. At least you know the problem, just need a solution.
I would like to say you're PMS is not logged into myPlex with a current PlexPass membership but the fact that Plex/Web is showing now playing obviously rules that idea out. What PMS version is it? Maybe a restart of PMS or your server is worth a try.
No, the URL is correct. Odd that it's not loading. At least you know the problem, just need a solution.
I would like to say you're PMS is not logged into myPlex with a current PlexPass membership but the fact that Plex/Web is showing now playing obviously rules that idea out. What PMS version is it? Maybe a restart of PMS or your server is worth a try.
Disregard my previous newbieness, that url loads just fine without any lag. I was adding the /web into the url.
Logged in, checked. I restart PMS itself a couple of times a week, and incidentally PMS just crashed an hour ago so that's checked, and I've also restarted the VM a couple of times since this begun happening, about 2-3 weeks ago I believe I saw this first.
But what bothers me is that it's random - Meaning there is some kind of pattern. Server load seems logical but doesn't seem to fit in this case. I´m going to try to disable plexwatch.exe scheduled tasks and see if it makes any difference. Maybe this happens when plexWatch.exe is returning to many notifications to me?
Do current streams appear on the index page or this error displays in place of them? You are having this same issue on the charts page too right? Any additional info in the apache error logs?
Do current streams appear on the index page or this error displays in place of them? You are having this same issue on the charts page too right? Any additional info in the apache error logs?
Usually at first I just get the maximum time error, sometimes along with SQL - Unable to prepare statement error, and nothing else. Not always both. Then I hit refresh and I either get the charts and an error under History, or the full page with correct information. These errors occur on the home, history and Charts page, and always the same errors.
Just right now I got the "Database is locked" error when opening the Charts page, and I had to refresh it 3 times to get it to display the info. Server under minimal load, just 3 people direct streaming from me atm, no cpu load and low bandwidth usage. Also, according to Chrome resources, it takes about 12 seconds to open the charts page. Edit: That's both via client and on the server itself. Same numbers, 11.5-12.5s.
Apache logs have no errors that could be connected, just 1-2 errors every other day, with different timestamps then these errors, and much less frequent.
Usually at first I just get the maximum time error, sometimes along with SQL - Unable to prepare statement error, and nothing else. Not always both. Then I hit refresh and I either get the charts and an error under History, or the full page with correct information. These errors occur on the home, history and Charts page, and always the same errors.
Just right now I got the "Database is locked" error when opening the Charts page, and I had to refresh it 3 times to get it to display the info. Server under minimal load, just 3 people direct streaming from me atm, no cpu load and low bandwidth usage. Also, according to Chrome resources, it takes about 12 seconds to open the charts page. Edit: That's both via client and on the server itself. Same numbers, 11.5-12.5s.
Apache logs have no errors that could be connected, just 1-2 errors every other day, with different timestamps then these errors, and much less frequent.
It's still on my list to look into lock options, but no timeframe. Maybe for now you could just copy the DB to another file ever few minutes.. Then have plexWatch/Web use that path.