PowerScheduler wakes up but does not start recording (1 Viewer)

jmarc

MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Hi,

    Sorry if this is not the correct forum category.

    I am using the latest MP1.12 in a single seat mode with MySQL 5.6

    I have a strange situation where PowerScheduler would wake up the computer at the right time for recording but then would NOT start the recording and would go back to sleep 15 minutes. See log extract attached with comments.

    I have disabled PS for the time being.

    Any thoughts as to why this would happen?

    Thanks!

    JM
     

    Attachments

    • TVService Extract.txt
      27.4 KB

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    Hello,

    Posting a portion of the log file is not really helpful as you have cut out the important information. Please zip the full log files, ideally the complete directory, and upload it here.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Thanks. Here are all the log files. The portion I highlighted comes from TVService.6.log
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Looks like the scheduler locked up here at the point where it should be getting the current set of schedules from the database:
    [2015-08-09 08:28:01,822] [Log ] [PowerEventThread] [INFO ] - Scheduler: started

    There's no indication of errors in our log files.
    Can you please check your MySQL DB log files for errors and/or slow queries at around that time.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Thanks. Not too sure how to do that. I went to "C:\programdata\MySQL\MySQL Server 5.6\data" but found nothing relevant and also I opened tables "General_log" and "Slow_log" in Mysql DB, but they were empty. I don't know how to enable logging if needed.

    The issue happens only when waking up, and not with all scheduled recordings. If I disable PowerScheduler then all recordings start normally.

    I imported most of the scheduled recordings from another MP installation as I have rebuilt MP on a new hardware (Windows 7 64 bit in both instances). I need to do more testing but it could be that newly created recordings do start correctly. Could imported schedules be an issue?

    Cheers,
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks. Not too sure how to do that. I went to "C:\programdata\MySQL\MySQL Server 5.6\data" but found nothing relevant and also I opened tables "General_log" and "Slow_log" in Mysql DB, but they were empty. I don't know how to enable logging if needed.
    In the past I've only ever used the administration section of MySQL Workbench to check MySQL logs... but I suppose what you've checked is equivalent. Note that the options for log level etc. are also accessible via MySQL Workbench admin (or the mysql .ini/my.ini file if you're very brave).

    The issue happens only when waking up, and not with all scheduled recordings. If I disable PowerScheduler then all recordings start normally.
    If disabling PS helps then perhaps the problem is that sometimes (when you're unlucky!) not enough time is given for the PC to resume properly?
    I say this because the DB query that seems to be getting stuck is a query for all schedules. Therefore it shouldn't matter which recording is triggering the resume. You can see this for yourself here:
    https://github.com/MediaPortal/Medi...Library/TvService/Scheduler/Scheduler.cs#L122

    Remember that in the log we see:
    [2015-08-09 09:03:50,748] [Log ] [PowerEventThread] [INFO ] - Scheduler: started

    The code tells us the next line to expect should be "Scheduler: loaded X schedules"... but we don't see that. Therefore something is getting stuck in that "gap". The gap contains the request/query for all schedules...
    I imported most of the scheduled recordings from another MP installation as I have rebuilt MP on a new hardware (Windows 7 64 bit in both instances). I need to do more testing but it could be that newly created recordings do start correctly. Could imported schedules be an issue?
    I wouldn't have thought importing schedules would be a problem... but maybe I'm wrong. Nothing is certain at this time.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Thanks. Yeah there might be an issue with the PC not resuming fast enough and TV service being unable to query the DB. Is there a parameter I could change in TV service to tell it to wait a little before starting operations after a wake up?

    In TVService.6.log it looks like the scheduler is trying to run a second time a second later as if it failed the first time.

    Also does TVservice use localhost or host name to resolve the address of mySQL server? I'm asking because name resolution on my home network is a bit slow (router not very good) so using a host name could be an issue.

    * Starts correctly after 1st wake up at 5.38 *
    [2015-08-09 05:38:06,008] [Log ] [PowerEventThread] [INFO ] - TvController.OnResume()
    [2015-08-09 05:38:06,009] [Log ] [PowerEventThread] [INFO ] - Controller: setup HeartBeat Monitor
    [2015-08-09 05:38:06,028] [Log ] [HeartBeatMonitor] [INFO ] - Controller: Heartbeat Monitor initiated, max timeout allowed is 30 sec.
    [2015-08-09 05:38:06,147] [Log ] [PowerEventThread] [INFO ] - Scheduler: started
    [2015-08-09 05:38:06,188] [Log ] [PowerEventThread] [INFO ] - Scheduler: loaded 23 schedules
    [2015-08-09 05:38:06,188] [Log ] [PowerEventThread] [DEBUG] - Scheduler: thread started.

    * Doesn't start recording *
    [2015-08-09 08:28:01,821] [Log ] [PowerEventThread] [INFO ] - TvController.OnResume()
    [2015-08-09 08:28:01,821] [Log ] [PowerEventThread] [INFO ] - Controller: setup HeartBeat Monitor
    [2015-08-09 08:28:01,822] [Log ] [HeartBeatMonitor] [INFO ] - Controller: Heartbeat Monitor initiated, max timeout allowed is 30 sec.
    [2015-08-09 08:28:01,822] [Log ] [PowerEventThread] [INFO ] - Scheduler: started
    then nothing...

    * Same 1 second later *
    [2015-08-09 08:28:02,957] [Log ] [PowerEventThread] [INFO ] - TvController.OnResume()
    [2015-08-09 08:28:02,957] [Log ] [PowerEventThread] [INFO ] - Controller: setup HeartBeat Monitor
    [2015-08-09 08:28:02,976] [Log ] [HeartBeatMonitor] [INFO ] - Controller: Heartbeat Monitor initiated, max timeout allowed is 30 sec.
    [2015-08-09 08:28:02,977] [Log ] [PowerEventThread] [INFO ] - Scheduler: started
    then nothing...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Is there a parameter I could change in TV service to tell it to wait a little before starting operations after a wake up?
    It would be a PS setting if such a parameter existed. I'm not a PS expert, but it doesn't look like such a setting exists. Sorry.

    In TVService.6.log it looks like the scheduler is trying to run a second time a second later as if it failed the first time.
    Yes, it did fail the first time... and the second time also.

    Also does TVservice use localhost or host name to resolve the address of mySQL server? I'm asking because name resolution on my home network is a bit slow (router not very good) so using a host name could be an issue.
    Ahhh, I see. TV Server uses whatever you put in the gentle.config file. If you put an IP address in there then an IP address will be used; same for a host name.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Ok I'll try a few things tomorrow.

    By the way there is this option in PS: "Reinitialize TV controller on wakeup (also reinitializes tuner)". Would it possibly help if I turn it on?

    Thanks.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    TV server has been waking up and recording correctly for the last 6 days so I assume it's fixed, The only change I made was to replace the host name with the IP address in gentle.config. Thanks for the help. I'll report back if it misbehaves again.
     

    Users who are viewing this thread

    Top Bottom