TV Service stops randomly - MP v1.11 (1 Viewer)

K24A3

MP Donator
  • Premium Supporter
  • May 1, 2010
    78
    4
    Home Country
    The TV service stops randomly, unexpectedly. No error messages, nothing :(
    It rarely happened previously (it only happened during bad weather), now it happens about 1 or 2 times a week.
    I haven't added any new plugins or anything, but I did move to a new home, the weather has been sunny recently. Reception is better than the previous home.

    Looking at the logs it seems the cause is an out or memory problem?
    Log file attached.

    Why doesn't the TV Service start back up automatically?
    Can this feature be added? Or at least an error message popup so we know when it happens?

    (TV service stopped in the afternoon on the 15th OCT)
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Hi,

    from your log:
    Code:
    [2015-10-15 23:23:47,645] [Log    ] [scheduler thread] [INFO ] - scheduler: SchedulerWorker inner exception Error: StatementErrorUnclassified
    Gentle.Common.GentleException: select idProgram, idChannel, startTime, endTime, title, description, genre, state, originalAirDate, seriesNum, episodeNum, episodePart, episodeName, starRating, classification, parentalRating from Program where title = ?title and idChannel = ?idChannel and endTime > ?endTime and startTime <= ?startTime order by startTime asc limit 1 offset 0; ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

    I do not know if it is a real cause. Please check when the TvServer aborts (but it was not a real abort) if the mysql is running or not? And please check if the out of memory if real issue or not.
     

    K24A3

    MP Donator
  • Premium Supporter
  • May 1, 2010
    78
    4
    Home Country
    Thanks for looking into this.
    How do I check for the aborts?

    I checked the RAM usage, it is currently 2GB is used out of 7.8GB, I restarted the TV service since it happened but I didnt reboot the PC.
    I dont see any signs of the RAM running out, the notebook is running perfectly.


    Update: FYI..updated system specs, checked MySQL , it is running.
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    Hello :)

    The TV service stops randomly, unexpectedly. No error messages, nothing :(
    I'm not seeing any evidence of the TV service stopping in the log file. It does appear that your PC has run out of memory... but the TV service doesn't stop. When this happens, TV Server won't be able to perform its usual functions.

    It rarely happened previously (it only happened during bad weather), now it happens about 1 or 2 times a week.
    The log file only covers 15 October so I'm not able to look for previous problems.

    I haven't added any new plugins or anything, but I did move to a new home, the weather has been sunny recently. Reception is better than the previous home.
    Technically it is possible for reception issues to cause crashes... but as mentioned above: the TV service isn't crashing. For the record, TV Server is also very resilient to bad reception. I haven't seen reports of crashes due to bad reception for years now.

    Why doesn't the TV Service start back up automatically?
    As above: because it hasn't stopped. :)

    Can this feature be added?
    There's no need. Windows can already be configured to restart any service (including TV service) that stops unexpectedly. Just configure the service properties:
    upload_2015-10-16_2-45-33.png



    Or at least an error message popup so we know when it happens?
    The TV service runs under a system account and can't interact with the desktop. Therefore it can't generate popup messages directly.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    How do I check for the aborts?
    I think that's a question for you because it was you who said that you think/thought the TV service was aborting (stopping). What symptoms do/did you see that causes/caused you to think that?

    I checked the RAM usage, it is currently 2GB is used out of 7.8GB, I restarted the TV service since it happened but I didnt reboot the PC.
    I dont see any signs of the RAM running out, the notebook is running perfectly.
    You've restarted the TV service so it is too late to check the RAM now. You'd have to have checked it before restarting the service.
     

    K24A3

    MP Donator
  • Premium Supporter
  • May 1, 2010
    78
    4
    Home Country
    It's been perfect weather today, so I can pretty much assure you there wouldn't have been any reception issues,
    Not sure about the resilience of the TV server during bad reception, I would bet $100 on the TV service stopping in really bad weather every time. Maybe its a hauppauge driver issue, who knows..

    Regarding the [2015-10-15 23:23:47,645] time stamp (11.23pm), I checked the lost recordings, the earliest lost recording was at around 8pm. the TV server stopped between about 7:30pm-8.30pm.

    You quoted "What symptoms do/did you see that causes/caused you to think that?"
    - There were unrecorded/missing programs on the SSD, I had 4-5 recordings set up, but TS files were missing.
    - The TV Server configuration app had the Start/Stop service button with the button text set to "Start Service", which would indicate that the service must have stopped at some point.

    Note that I have my own WPF .NET app running, it is basically just a video player using DirectShow. Being a .NET app it will crash if it runs out of it's 2GB allocated RAM shell. It is running all the time, it didnt crash at the time, I was using it after the TV service crashed to play a movie (which was before I restarted the TV server), no problems at all. I know very well when my app runs out of RAM, playing a movie would have consumed about 250MB of extra RAM, so I really doubt the PC ran out of RAM.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    It's been perfect weather today, so I can pretty much assure you there wouldn't have been any reception issues,
    In my first response I was trying to point out that I think the weather is irrelevant.

    Not sure about the resilience of the TV server during bad reception, I would bet $100 on the TV service stopping in really bad weather every time. Maybe its a hauppauge driver issue, who knows..
    I would bet the opposite. Bring on the evidence. :)

    Regarding the [2015-10-15 23:23:47,645] time stamp (11.23pm), I checked the lost recordings, the earliest lost recording was at around 8pm. the TV server stopped between about 7:30pm-8.30pm.
    The fact that the 11:23 PM log entry exists is proof that the TV service was still running at that time.
    As for the lost recordings: they're probably an effect of the memory issue. Like I said in my first response, when the PC (or process) runs out of memory TV Server won't be able to perform its usual functions. Usual functions include recording. In other words: I'm trying to say that the problems you've experienced today appear to be caused by the out-of-memory situation.

    You quoted "What symptoms do/did you see that causes/caused you to think that?"
    - There were unrecorded/missing programs on the SSD, I had 4-5 recordings set up, but TS files were missing.
    - The TV Server configuration app had the Start/Stop service button with the button text set to "Start Service", which would indicate that the service must have stopped at some point.
    As above. These symptoms are explained by the out-of-memory situation.

    Note that I have my own WPF .NET app running, it is basically just a video player using DirectShow. Being a .NET app it will crash if it runs out of it's 2GB allocated RAM shell. It is running all the time, it didnt crash at the time, I was using it after the TV service crashed to play a movie (which was before I restarted the TV server), no problems at all. I know very well when my app runs out of RAM, so I really doubt the PC ran out of RAM.
    So maybe the TV service process ran out of RAM. The point I was trying to make is that it is too late to check the RAM situation after you've restarted the TV service (because you can't check how much RAM the TV service was using before you restarted it).
     

    K24A3

    MP Donator
  • Premium Supporter
  • May 1, 2010
    78
    4
    Home Country
    I have no evidence of the TV service stopping during bad weather but I can definitely guarantee you it was a common occurrence. (again, could be a hauppauge driver issue)

    You say "when the PC (or process) runs out of memory TV Server won't be able to perform its usual functions."
    What confuses me is that you said the TV Service kept on running fine after 8pm, yet the recordings didnt get written to the SSD, and no errors were reported in the logs at the time.
    Wouldn't these events be written to the log file when it happens during the caught exception crash method code?
    I know it can be difficult (or impossible?) to catch exceptions from c++ dll's via a .NET 4.0 app (usually a c++ dll would crash the .NET app right?), is this the reason the errors weren't logged?


    Anyway let me know what I should do next time it happens.
    Before restarting the TV service, I'll check the RAM usage.
    Let me know if there are any other things to check when it happens the next time.
     
    Last edited:

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Before restarting the TV service, I'll check the RAM usage.

    Please check the ram usage of the tvservice too. And check if the mysql service runs or not.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    Hello again

    I have no evidence of the TV service stopping during bad weather but I can definitely guarantee you it was a common occurrence. (again, could be a hauppauge driver issue)
    In the absence of evidence I think we're going to have to agree to disagree about bad weather causing the TV service to stop. I'd be more than happy to look at any evidence you can supply in future. Hopefully we can agree that weather was not a factor in the problems on 15 October.

    What confuses me is that you said the TV Service kept on running fine...
    I have not said that. I did say the TV service kept running, but I have not said it was "fine". It clearly wasn't. The point I've been trying to make is that it hadn't stopped outright as you have been claiming.

    ...after 8pm, yet the recordings didnt get written to the SSD and no errors were reported in the logs at the time.
    I disagree with your claim that the problems started at 8 PM (or between 7:30 PM and 8:30 PM as you said in your previous post).

    The log file shows that the following recordings failed completely or were only partially recorded:
    [2015-10-15 08:23:09,547] [Log ] [scheduler thread] [INFO ] - Scheduler: Time to record 7TWO 8:23 AM-9:00 AM Harry's Practice
    [2015-10-15 14:53:04,941] [Log ] [scheduler thread] [INFO ] - Scheduler: Time to record 7TWO 2:53 PM-3:30 PM SCU: Serious Crash Unit
    [2015-10-15 17:53:01,743] [Log ] [scheduler thread] [INFO ] - Scheduler: Time to record 7mate 5:53 PM-7:00 PM Mythbusters

    Note the times. In other words, the TV service clearly had problems much earlier than 8 PM.

    In my opinion the TV service appears to have been partially functional until approximately 9:20 PM (when the out-of-memory errors start in the log).

    Wouldn't these events be written to the log file when it happens during the caught exception crash method code?
    I don't know what you mean by "caught exception crash method code".
    I have no evidence that any recordings were meant to start after 7:30 PM. All I can see is what the log files say. They show:
    • "The Bachelorette" starting to record successfully at 7:15 PM
    • the out-of-memory exceptions starting at approximately 9:20 PM

    I know it can be difficult (or impossible?) to catch exceptions from c++ dll's via a .NET 4.0 app...
    Ummm, I have no idea what c++ DLLs have to do with this. :confused:

    (usually a c++ dll would crash the .NET app right?)
    I presume you mean to say that an error generated within a c++ DLL would cause a crash.
    It might; it might not; it entirely depends on the circumstances (whether the c++ DLL contains native or managed code, the nature of the error etc. etc. etc.).
    ...but again, I don't understand the relevance. TV Server didn't crash. :confused:


    Anyway let me know what I should do next time it happens.
    Please:
    1. Provide a full set of log files. Use the Watchdog tool with option 3 to collect the logs so that we get Windows application and system event logs.
    2. Provide screenshot(s) of Windows task manager showing the RAM usage for all processes. Be sure to click "show processes for all users".
    3. Attempt to open and navigate within TV Server Configuration. Note the results.
    4. Attempt to view live TV from within MediaPortal.

    Regards,
    mm
     

    Users who are viewing this thread

    Top Bottom