TV Service stopped unexpectedly (2 Viewers)

Anthony Vaughan

MP Donator
  • Premium Supporter
  • June 25, 2015
    300
    48
    Home Country
    United Kingdom United Kingdom
    Country flag
    The TV Service on my MediaPortal server machine stopped unexpectedly and generated the attached log.

    Can someone please explain what happened and maybe suggest whether I need to do something to avoid this happening again.

    Thank you in advance.

    Tony

    Sorry. Should have mentioned the version is 1.27.
     

    Attachments

    • TVService.2.log
      1,021.4 KB · Views: 0

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,310
    1,403
    Southampton
    Home Country
    United Kingdom United Kingdom
    Country flag
    The TV Service on my MediaPortal server machine stopped unexpectedly and generated the attached log.
    I cannot see where "TV Server" decided to stop, but one thing that looks odd in that log is that the EPG grabs all fail to insert any EPG data into the database. Look for the string "Inserted" (exact case, without the quotes), and you get lines like this:

    no_epg_entries.jpg

    Is this the expected outcome on your system? (I have a vague recollection that you perform EPG editing, or have I confused you with someone else?)

    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    300
    48
    Home Country
    United Kingdom United Kingdom
    Country flag
    Hi CyberSimian

    I trust you are well in these uncertain times.

    I do manipulate the EPG, but only in the SQL Server database, and the 'Always try to update' option is set OFF. Therefore, I would expect grabbing to return nothing when the source EPG has no new programs.

    The TV Service runs fine for weeks and then, very occasionally, crashes.

    I think I need to broadcast a message to clients when the TV Service has stopped so I know I have to do something about it.

    The 'Inserted' log entries seem to happen quite regularly.

    I do have 'Enable CRC check' turned off because I seem to remember that someone recommended not having it set for my set-up. I think my set-up gets all of the EPG from one transponder. The only setting I have turned ON in the DVB EPG > General section is 'Always try to fill holes'.

    Does that sound right to you?

    Tony

    I've looked back at previous discussions and notice that we had a chat about the merits or otherwise of using WebEPG. I did try using broadcast EPG but ended up going back to WebEPG because I found it worked better for my set-up. However, I did notice that I had grab EPG while timeshifting/recording set ON. I have set this OFF (with the grab when Idle set ON). Maybe this will improve things. I can't remember why I set it ON because, back ion March 2019, we had a discussion about this very parameter and your advice was to turn it OFF - how wise:).
     
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,310
    1,403
    Southampton
    Home Country
    United Kingdom United Kingdom
    Country flag
    The only setting I have turned ON in the DVB EPG > General section is 'Always try to fill holes'.
    That probably explains it :). The relevant setting is Always try to update existing entries. If that setting is disabled, TV Server does not update existing entries when it next grabs the DVB EPG. Consequently, TV Server may find no entries to add to the database (which is what your log shows).

    I have that setting enabled. The reason for this is that when the EPG for the 8th day is added to the broadcast datastream, the broadcasters for some programmes provide only a generic description, but then make the description more specific one or two days before broadcast. With that setting enabled, the EPG is updated with the more-specific description :). But if that setting is disabled, the more-specific description is thrown away, and the generic description is retained :(.

    This becomes more complicated if you use two (or more) EPG sources. You might prefer to use an EPG source that provides very detailed programme information for most of your channels, but which does not provide EPG info for all of your channels. So for the "missing" channels you have to use an alternative EPG source that provides inferior information. You don't want the inferior source updating the EPG entries provided by the superior source, so you need to configure the two sources carefully, to avoid them updating each other's channels. o_O

    If WebEPG provides all of your channels, there is no reason to use the DVB EPG grabber, so you could disable both the timeshift grabber and the idle grabber.

    The TV Service runs fine for weeks and then, very occasionally, crashes.
    I don't recollect having experienced this, but my TV Server is on the same system as my MP client, and for whatever reason, I seem to reboot at least once per week (but not on a regular schedule). A workaround for your system might be to schedule a reboot (say) once per week. You can use "PowerScheduler" on TV Server to do this for you; see this page in the Wiki (the "Reboot" tab).

    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    300
    48
    Home Country
    United Kingdom United Kingdom
    Country flag
    The reason I don't use Always try to update existing entries is because I have a process that renames programs that contain 'New:' as well as a few other values. Alongside that process I have a function that allows me to change program information and start and end times to cater for schedule changes. Therefore, I don't want the EPG to keep resetting the database.

    As it happens, I have another process that reboots the server machine daily, overnight, except on one day (when the database server is rebooted. This server also happens to be the common configuration point for all of my MediaPortal clients).

    I only use one EPG source (WebEPG) so I think it is worth trying disabling both DVB EPG grabber options, as you suggest.

    It looks like I now have all options covered.

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    300
    48
    Home Country
    United Kingdom United Kingdom
    Country flag
    Hi CyberSimian

    It occurs to me that one of the main issues I had when the TVService stopped running was that I didn't know it had happened even though I was watching recorded programs from one of my client machines at the time. If I had known the TVService had stopped I would have been able to immediately restart it again.

    Would it be possible for clients to broadcast a message on the screen telling users that the TVService has stopped? (by periodically polling for the server, I assume).

    That would be immensely helpful.

    Tony
     

    TLD

    Portal Pro
    October 26, 2007
    710
    125
    Rainy Washington
    Home Country
    United States of America United States of America
    Country flag
    You can have windows restart TV Server when it crashes. go to computer management - services - tv server, right click tv server click properties, click on recovery tab and in the dropdown boxes put restart the service.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,310
    1,403
    Southampton
    Home Country
    United Kingdom United Kingdom
    Country flag
    Would it be possible for clients to broadcast a message on the screen telling users that the TVService has stopped? (by periodically polling for the server, I assume).
    I am not aware of any existing facility to do this :(.

    If you want to write a tool of your own, you could perhaps look at the MP client log file. There are entries that contain the word "Heartbeat" that might allow you to detect an unresponsive TV Server. Once detected, you need to draw the user's attention to the problem. I would probably use AutoHotKey, because that can minimise the MP client window to the Task Bar (which the user would certainly notice!) and display a pop-up window on screen. So:
    • Start an AutoHotKey script when the client system boots.
    • Once each minute read the MP log file looking for trigger strings (you will need to experiment to find what string occurs when TV Server is unresponsive).
    • When the trigger string is found, minimise the MP window to the Task Bar and display a pop-up window.
    I expect that there are more elegant solutions that send appropriate datastreams to the correct ports that TV server would reply to, but I have no idea what they might be, so I would not do it that way. o_O

    A dedicated solution that is part of the MP client would be the best solution, but such a solution will probably not be implemented in the near future. :(

    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    300
    48
    Home Country
    United Kingdom United Kingdom
    Country flag
    You can have windows restart TV Server when it crashes. go to computer management - services - tv server, right click tv server click properties, click on recovery tab and in the dropdown boxes put restart the service.

    I've known about that option for 30 years and never had a reason to do that - UNTIL NOW.

    Thank you for your help.

    CyberSimian: I think it would be a good option to control broadcasting that the TVService has failed internally, but I agree that there are other probably more important things to fix before doing that - I think TLD's suggestion should do what I need.

    Tony
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,310
    1,403
    Southampton
    Home Country
    United Kingdom United Kingdom
    Country flag
    I was looking at your log file again, and found the place where "TV Server" decided to stop. it is at:
    2021-02-16 20:55:05,727 (line 7571). The error is an SQL error, and the text description is:

    Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

    Is it possible that your SQL EPG update program interfered with TV Server's access to the database?

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Similar threads

    Hi @joecrow, Thank you, I did uninstall MYSQL, LAV and deleted the respective folders in ProgramData, then re-installed MP1.27 and hurrah I've set up the TV side of things and live TV and recordings are working. Thank you and @joEhSuper for your help, I really do appreciate it, now I just need to set up all the plugins again :-)
    Hi @joecrow, Thank you, I did uninstall MYSQL, LAV and deleted the respective folders in ProgramData, then re-installed MP1.27...
    After a short break away from Mediaportal, I installed MP1.27 and have the TV Server on a different computer to the client. I...
    Replies
    5
    Views
    371
    Yes. I guess we'll just have to wait for it to happen again. Tony
    Yes. I guess we'll just have to wait for it to happen again. Tony
    I'm trying to install MediaPortal 1.27 on a machine as a single seat installation but keep getting the following error dialog...
    Replies
    36
    Views
    1K
    Azzuro and doskabouter, got it working. Resetting the database worked. And after linking to the server via current IP and making a new db, I relinked to the original db and all settings were restored. Thanks again and Happy New Year to all!
    Azzuro and doskabouter, got it working. Resetting the database worked. And after linking to the server via current IP and making a...
    A couple weeks ago the TV server service stopped working. Not urgent, so waited till today to research it. Did an upgrade to 1.26...
    Replies
    4
    Views
    504
    Well it's been a couple of days and we've had no more unable to play errors .
    Well it's been a couple of days and we've had no more unable to play errors .
    I've just upgraded the motherboard, CPU, ram, boot drives and PSU in my TV Server (always on), and am now having intermittent...
    Replies
    8
    Views
    834
    As mentioned by Henso next version of MP2 will have support included. The release will be quite soon, so you don’t need to wait too long.
    As mentioned by Henso next version of MP2 will have support included. The release will be quite soon, so you don’t need to wait too...
    Hi, I recently switched from MP1 to MP2, but I have some problems. The service keeps crashing, it's always with big files or many...
    Replies
    5
    Views
    605
    Top Bottom