TV Service taking long while to shutdown, delaying Windows shutdown/reboot (1 Viewer)

michael_t

Portal Pro
November 30, 2008
1,258
813
Germany Germany
...The MP1-3172 fix makes TVService react on the Windows pre-shutdown message and let it stop the TVController and all TVServer plugins cleanly. Before they were killed by the Windows Service Manager which led to exceptions and error messages in the logs. But: Though the TVService shuts down cleanly now (seen from MP's view), Windows does not notice that the TVService has been stopped and therefore now waits for 10 seconds to get a stop notification (gives an error in the System event log) and only then continues its shutdown progress. I have found no way so far how to signal Windows that the TVService has been stopped from .NET managed code.
So the options are:
- Revert the MP1-3172 fix and ignore the pre-shutdown message (will bring back exceptions and error logs but shuts down 10 sec faster)
- Keep everything as it is now (slower shutdown and error in System event log)
- Find a way to stop TVService cleanly and under control of the Windows Service manager
The latter should be achieved, so @Developers who can help?

Michael
I found a solution for the problem which triggers TV Service Stop() on receiving the pre-shutdown message and lets the Windows Service Control Manager know that the tvservice has stopped. The code is based on this blog. I reopened the MP1-3172 issue in JIRA and provided a branch in github (https://issues.team-mediaportal.com...ice_ignores_shutdown_(reopened)/MediaPortal-1).

Michael
 
Last edited:

l337

MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Germany Germany
    which build I can download and test? thank you michael t
     

    l337

    MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Germany Germany
    Hi

    I have installed 1.6 final the shutdown time is slow i wait 40 seconds and the pc power off....

    I kill the tvserver with taskmanager and than shutdown the pc i wait 7 seconds and pc power off...

    Michael t? Ideas?
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    The fix was not included. TV Server is in code freeze and we decided this is not a serious enough problem to make an exception.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,447
    10,273
    France
    France France
    Country flag
    The new branch reserved for it and for help to apply it on TVE35 was deleted by michael (request by elliotmc in internal cleanup git branch forum/thread).
     

    l337

    MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Germany Germany
    if I understand correctly, this "error" only solved with TVE 35
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,447
    10,273
    France
    France France
    Country flag
    TVE35 didn't have previous fix that trigger the issue, so i would say that it should work correctly.
    But when we will update TVE35 against current master (hope it will be done with no pain lol) then we need to have the shutdown fix on it).
    The PB is that this branch was deleted but we have it in master history :)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    L Service keeps crashing General 5
    X [solved] Display needs to be turned on for TV services to function General 1
    T [solved] failed to-startup tvservice Installation, configuration support 1
    F [solved] Could not find the MediaPortal.Common.Logging.ILogger service after upgrading from 2.2.2 to 2.2.3 General 2
    DHosein Mediaportal & Antimalware Service High CPU issue General Support 2
    Z TV-Service in falscher Version Installationsprobleme? 9
    T Missing sound in online streaming service (SVTPlay) General Support 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    K sudden complication watching recorded TV Newcomers Forum 6
    P [solved] MP2 fails to install: "Insufficient privileges to start services" General 11
    J TV service not available General 7
    M [solved] Setup Issue - Hanging on Starting Services General 3
    ajs Sync databases by Media Sync Service MediaPortal 1 Talk 26
    BlueMax1916 [Question] What does MP2 Server Service have to do with ...microsoft.com/filestreamingservice...? MediaPortal 2 3
    Holzi [solved] MediaPortal 2 will not install - Failed to start services MediaPortal 2 1
    Stéphane Lenclud [solved] TV Server Service preventing sleep General Support 18
    D Remove "Old" client names from Service Monitor? General 5
    B Server service on the service monitor keeps stopping randomly. Client can't see server status. 2.2 Archive 5
    D Upgrade to MP2.2 pre release fails with failure to start service 2.2 Archive 32
    T MP2.2 Pre Release fails installation with not starting the MP2-service 2.2 Archive 4
    BrownGhost Mepo/MediaInfo takes 59 secunds to open library and start play :o( General Support 26
    J List creation takes a long time MediaPortal 2 10
    N [will not fix] Changed settings do not take effect until MP2-Client is stopped and restarted. Submit: Bug Reports 4
    zunixnuz TV Mini-EPG long text cropped on bottom side Titan Skin Feedback 0
    olli14 Power scheduler settings for no shutdown as long as kodi client is online TV-Server 1
    Similar threads

























    Top Bottom