Deadlock in TV Server if recording while importing EPG (1 Viewer)

rlevis

MP Donator
  • Premium Supporter
  • August 15, 2008
    506
    28
    New Zealand New Zealand
    Country flag
    TV Server 1.25. Windows 10.

    This has been an issue for many years, if not since inception, and I hoped it would be resolved eventually, but I'm still suffering. I see dozens or people referring to the same issue over the years in these forums, all of which appear to be caused by anti-virus or other Windows settings. I've managed to repeat the issue consistently now so I hope this will go some way towards a fix. I don't have logs at this stage, but they are the same issues others have where TSWriter finishes at the correct time but the tuner continues tuning in and MP shows the recording is still being recorded (although it isn't) hours after it was supposed to finish. It requires an End Task in Windows Task Manager and service restart.

    It was made more obvious recently as the issue was occurring every night this week. I'm recording a long sport program (Snooker) between 2:00am and 6:30am every night with a 1 hour Post-record time, so it should finish at 7:30am.

    At 6:30am I have a scheduled task to create a TVGuide.xml via EPG Collector, which TV Server imports via the XML TV plugin a couple of minutes later. Only if this import occurs does the issue occur and recording does stop properly. 2 days ago I changed the time of the EPG import to 12 noon and the last 2 nights the recording has finished correctly, compared to 4 days before where it always failed. So the issue does appear to be related to the import of the EPG file. Perhaps it is due to the import process removing all the EPG data before importing the new file!

    This is interesting which I just noticed. A new recording is being started at 6:30am for a couple of hours, recording the same content as the original recording that started at 2am. That could be the one that doesn't stop. I suspect TV Server is getting confused somewhere when there is no EPG while a program is recording.

    There are probably some logs from 2 days ago if you would like them. Let me know what they are named.

    Cheers,
    Ross.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    1,719
    1,268
    Germany Germany
    Country flag
    Just a thought but have you tried the setting in XMLTv shown below in the screenshot, both disabled and enabled to see if anything changes?

    tv.jpg
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    506
    28
    New Zealand New Zealand
    Country flag
    Yes I have thought about it, if that will even resolve it, but as it says, it is recommended to be enabled so not sure what will happen when it is disabled. Will it keep old programs forever in the database?
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    1,719
    1,268
    Germany Germany
    Country flag
    Have to confess I have no idea but assume they will be overwritten by the import rather than deleted first. Given you can reproduce the problem I would have thought it would be worth trying it disabled, if there is no improvement you can always re-enable it.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,142
    1,326
    Southampton
    United Kingdom United Kingdom
    Country flag
    it is recommended to be enabled so not sure what will happen when it is disabled. Will it keep old programs forever in the database?
    The Wiki explains the action of this setting quite well; it says this:

    Delete old programs before import (Recommended)
    Tick this option if you want the contents of your EPG to be deleted before a new tvguide.xml is imported. A reason for doing this is that some TV guide sources may have programmes listed 14 days in advance, however the TV companies may not have confirmed all their schedules this far forward so the guide might contain entries such as To be confirmed or Film to be confirmed. These will be loaded into the EPG database and MediaPortal sees them as a normal programme. This is not too much of a problem while they are 10-14 days off, but as current days age off a large proportion of your EPG may end up as To be confirmed. The normal XMLTV import will only add new EPG entries where none exist in the database. It will not update existing ones. Deleting all the old programs before import ensures that the EPG data in the database is up to date as the tvguide.xml being imported.​

    A new recording is being started at 6:30am for a couple of hours, recording the same content as the original recording that started at 2am. That could be the one that doesn't stop.
    I use the DVB-T EPG in the UK, but I have had a couple of instances where "TV Server" recorded a programme twice, slightly displaced in time. Previously I used the "grab EPG while timeshifting/recording" setting with a one hour refresh interval. What happened is that a news broadcast was extended, and the programme that I wanted to record was delayed by 10 minutes, but "TV Server" started the recording at the original time. However, it just so happened that the next EPG grab occurred after the original start time, and before the revised start time, so "TV Server" noticed that there was a "new" programme that was part of the series and which was not the one already recording (different start and stop times), so it started recording that too, even though it was on the same channel. Both recordings finished at their respective stop times, so a non-stop recording did not occur in this case.

    This has been an issue for many years, if not since inception, and I hoped it would be resolved eventually, but I'm still suffering.
    It would be pleasing to think that this problem would be fixed within the next few weeks, but sadly I think it more likely that you will still be waiting for a fix ten years from now :cry:. However, at least you now know the combination of circumstances that trigger this error, so it is within your power to stop it recurring.

    -- from CyberSimian in the UK
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    506
    28
    New Zealand New Zealand
    Country flag
    Right, so I would not want that checkbox unchecked as many channels do have TBC later in the week. I guess you are right, and I can get around it for the time being. I'm recording DVB-S2 (paid) and DVB-T (free to air) in NZ, but it's generally always satellite recordings that have the issue, I guess because of the lengthy sports, and EPG imports set to occur 3 times a day. I've reduced that to once a day now and I'll hope for the best. I can't use the built-in EPG grabber in TV Server as it doesn't work properly here.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    1,719
    1,268
    Germany Germany
    Country flag
    Right, so I would not want that checkbox unchecked as many channels do have TBC later in the week. I guess you are right, and I can get around it for the time being. I'm recording DVB-S2 (paid) and DVB-T (free to air) in NZ, but it's generally always satellite recordings that have the issue, I guess because of the lengthy sports, and EPG imports set to occur 3 times a day. I've reduced that to once a day now and I'll hope for the best. I can't use the built-in EPG grabber in TV Server as it doesn't work properly here.
    Given the info. @CyberSimian posted I still think it is worthwhile, if only for troubleshooting, to confirm that the "delete old programs" is the cause of your problem, then at least we know where to direct any efforts to fix it. Could you at least try once and let us know?
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    506
    28
    New Zealand New Zealand
    Country flag
    It looks like I forgot to change the Task Scheduler to import at 6:30am. I was sure I had but appears not. It was the last day of the tournament so will try again next week when a new tournament starts.
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    doskabouter No guide info added due to a MYSQL deadlock Electronic Program Guide 1
    C 1.25.0 Need explanation - TV Servers/Scan settings TV-Server 0
    G MP2 - V2.3 Tv Server information General 1
    W MP2 - V2.3 MP2 Server stürzt immer nach kurzer Zeit ab Allgemeines Support- und Diskussionsforum 56
    W TV Server didn't show Magic-Pro ProHDTV Diamond2 card TV-Server 2
    JimCatMP Problems with TV Server on dual homed host. General Support 0
    cbr954rr EPG Genre map categories do not match tv server categories General 4
    R Firewall on server blocking client General 10
    E [solved] TV-Server Configuration Missing TV-Server 9
    F MediaPortal 1.16 server crashing due to user error? General Support 5
    E TV-SERVER control TV-Server 3
    CanadianEh MP TV server rebuild with Colossus 2 - Kodi clients receive PMT error when playing videos recoreded by Colossus 2 TV-Server 2
    M 1.25.0 Tv Server Configuration Italian Dvb-t2 test channel preview error Television (MyTV frontend and TV-Server) 8
    M TV Server Preview Window is blank, sounds works Television (MyTV frontend and TV-Server) 3
    catalpa ...immer mal wird der Server abgekoppelt :( Allgemeines Support- und Diskussionsforum 0
    A Keine Verbindung mit Kodi auf Server Allgemeines Support- und Diskussionsforum 11
    CyberSimian Unhandled exception in TV Server TV-Server 0
    Grisu002 Failed to startup - TV Server funktioniert nicht Allgemeines Support- und Diskussionsforum 0
    ajs [WiP] 5030: Add UHD Thumb size to TV Server MediaPortal 1 0
    toricred [solved] Configuring TV Server to use NAS General 5
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    T Server / client channel logo location Installation, configuration support 6
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    M TV Server can't tune to some DVB-S multiplexes while other software can General 0

    Similar threads

    Top Bottom