Stay Awake Whilst Loading EPG (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    OK, a little confused now. I am not sure this has not been fixed...

    I set powerscheduler plugin on TV server to 1 minute. I closed client so no powerscheduler running there.

    In tv.log I get
    Code:
    2009-12-02 17:18:19.421875 [XmlTvImporter]: Xmltv: imported 89 channels, 65029 programs status:tvguide.xml:File imported successfully; 
    2009-12-02 17:18:19.421875 [XmlTvImporter]: plugin:xmltv import done
    2009-12-02 17:18:19.421875 [XmlTvImporter]: plugin:xmltv: Telling PowerScheduler standby is allowed: True, timeout is one hour
    Which I think is as before (not sure about the timeout is one hour) but after that I get a lot of
    Code:
    2009-12-02 17:18:26.718750 [Program states thread]: BusinessLayer: ProgramStatesThread waiting...1 sec
    rows which I guess are Gilbers updates to the EPG ?? and the actual theads doing the inserts?

    but machine did not want to go to sleep :confused:

    Code:
    2009-12-02 17:19:11.750000 [Program states thread]: BusinessLayer: ProgramStatesThread waiting...4.25 sec
    2009-12-02 17:19:11.875000 [Powerscheduler Timer]: PowerScheduler: User input detected at 02/12/2009 17:19:09
    2009-12-02 17:19:11.875000 [Powerscheduler Timer]: PowerScheduler: lastUserTime: 17:19:09.2350 , False
    2009-12-02 17:19:11.890625 [Powerscheduler Timer]: NetworkMonitorHandler: standby allowed
    2009-12-02 17:19:11.890625 [Powerscheduler Timer]: PowerScheduler.NextWakeupTime: inspecting handler:GenericWakeupHandler time:31/12/9999 23:59:59
    2009-12-02 17:19:11.906250 [Powerscheduler Timer]: PowerScheduler.NextWakeupTime: inspecting handler:ScheduledRecordingsHandler time:02/12/2009 19:57:00
    2009-12-02 17:19:11.921875 [Powerscheduler Timer]: PowerScheduler.NextWakeupTime: inspecting handler:XmlTvImportWakeupHandler time:31/12/9999 23:59:59
    2009-12-02 17:19:11.921875 [Powerscheduler Timer]: PowerScheduler: lastUserTime: 17:19:09.2350 , False
    2009-12-02 17:19:12.750000 [Program states thread]: BusinessLayer: ProgramStatesThread waiting...5.25 sec
    and this continued and again after a while I got the same...

    I did force the machine to standby using the remote and on resume EPG was empty for some channels.... Just can't see why PowerScheduler has not sent the machine to sleep. I now have
    Code:
    2009-12-02 17:27:10.765625 [Program states thread]: BusinessLayer: ProgramStatesThread waiting...60.6875 sec
    2009-12-02 17:27:10.765625 [Program states thread]: BusinessLayer: ProgramStatesThread - done waiting. calling SynchProgramStatesForAll
    2009-12-02 17:27:10.765625 [Program states thread]: schedule.SynchProgramStatesForAll
    which I guess it telling me all the import threads are done.

    Going to try a bit more playing but appears PowerScheduler did not want to sleep anyway ????

    =================================
    No sleeping was user error :oops: had a VNC client connected and kept knocking the mouse.....
    =================================
    Can replicate. Now going to try your replacement libraries
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    ===============================================================================
    Not quite worked. I replaced the TVBusinessLayer and XMLTV dlls with the ones you provided,stopped and restarted TVSevice.
    Client was closed to avoid any interference

    As you can see from TV log xmltv import finished at 18:21:58 but at 18:22:50 the machine went into standby. It then resumed immediately and carried on from where it left off.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    =====================================================
    Reset everything and tried again. Same issue but this time it did not wake up immediately.

    Also noticed the following in error.log but should I assume this is nothing to do with your changes ???

    Code:
    2009-12-02 18:19:24.296875 [1]: Exception   :System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
       at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.Net.Sockets.TcpListener.Start(Int32 backlog)
       at System.Net.Sockets.TcpListener.Start()
       at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
       at TvService.Service1..ctor()
    
    2009-12-02 18:36:37.687500 [1]: Exception   :System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
       at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.Net.Sockets.TcpListener.Start(Int32 backlog)
       at System.Net.Sockets.TcpListener.Start()
       at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
       at TvService.Service1..ctor()

    ================================
    also just tried to access EPG screen with this enabled and I just get label not found errors which I presume is due to your change?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,367
    1,642
    Athens
    Home Country
    Greece Greece
    In tv.log I get
    Code:
    2009-12-02 17:18:19.421875 [XmlTvImporter]: Xmltv: imported 89 channels, 65029 programs status:tvguide.xml:File imported successfully; 
    2009-12-02 17:18:19.421875 [XmlTvImporter]: plugin:xmltv import done
    2009-12-02 17:18:19.421875 [XmlTvImporter]: plugin:xmltv: Telling PowerScheduler standby is allowed: True, timeout is one hour
    Which I think is as before (not sure about the timeout is one hour) but after that I get a lot of
    Code:
    2009-12-02 17:18:26.718750 [Program states thread]: BusinessLayer: ProgramStatesThread waiting...1 sec
    rows which I guess are Gilbers updates to the EPG ?? and the actual theads doing the inserts?
    This is normal. The timeout only matters when preventing standby (if the plugin does not communicate within the timeout period PowerScheduler will ignore the plugin when considering if standby is allowed).
    Also after each batch of inserts ProgramStatesThread will wait for 60 second and if no more inserts happen it will update program states (for schedules).
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,367
    1,642
    Athens
    Home Country
    Greece Greece
    ===============================================================================
    Not quite worked. I replaced the TVBusinessLayer and XMLTV dlls with the ones you provided,stopped and restarted TVSevice.
    Client was closed to avoid any interference

    As you can see from TV log xmltv import finished at 18:21:58 but at 18:22:50 the machine went into standby. It then resumed immediately and carried on from where it left off.
    I can't quite figure out what is wrong. It is not related to my changes. But it doesn't make much sense either. It seems as if PowerScheduler ignores XmlTV plugin, or that the original call to disallow standby somehow times out too early.

    I have attached a patched powerscheduler that logs expired EPG sources. Please try it (along with the previous patch) and post full tv server logs.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I have attached a patched powerscheduler that logs expired EPG sources. Please try it (along with the previous patch) and post full tv server logs.
    Will do but got a busy few days coming up so unlikely to get chance until early next week :(

    also just tried to access EPG screen with this enabled and I just get label not found errors which I presume is due to your change?
    Did you see this bit as the damn automerge sort of hid this at the bottom of another post
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,367
    1,642
    Athens
    Home Country
    Greece Greece
    I have attached a patched powerscheduler that logs expired EPG sources. Please try it (along with the previous patch) and post full tv server logs.
    Will do but got a busy few days coming up so unlikely to get chance until early next week :(
    Not to worry, I will be away next week, so I won't be able to reply either. Take your time with your tests.

    also just tried to access EPG screen with this enabled and I just get label not found errors which I presume is due to your change?
    Yes I saw it but I'm not sure what you are referring to. Is it the TV Guide screen in MP? If so, usually this is due to lost DB connection, or sometimes lost connection to tvserver. The error in you last post shows that tvserver failed to start remoting and as a result will not accept any connections.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    also just tried to access EPG screen with this enabled and I just get label not found errors which I presume is due to your change?
    Yes I saw it but I'm not sure what you are referring to. Is it the TV Guide screen in MP? If so, usually this is due to lost DB connection, or sometimes lost connection to tvserver. The error in you last post shows that tvserver failed to start remoting and as a result will not accept any connections.
    I think the error was about the time the machine went into standby and came straight out again but I had the problem in MP EPG after I had stopped and restarted TVService the second time.

    As you say I think the EPG going odd was not a direct thing from your change but something else. Will keep an eye on this to ensure it is working when I try with revised powerscheduler
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I have attached a patched powerscheduler that logs expired EPG sources. Please try it (along with the previous patch) and post full tv server logs.
    Not sure it is going to help but logs attached

    EPG is working (albeit with some channels having no data) so was a different issue earlier (think going to sleep mid something broke connection to TVservice ?)
     

    Attachments

    • tv.zip
      30.6 KB

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,367
    1,642
    Athens
    Home Country
    Greece Greece
    This time it is different. PowerScheduler has already initiated standby when xmltv decides it's time to import a new tvguide.xml!

    Normally there is not much time since PowerScheduler initiates a standby and the system actually going into standby. But if you configure PowerScheduler to reinitialize tvservice, there is plenty of time for xmltv to start a new import while tvservice is releasing resources. When this happens it is irrelevant whether xmltv allows standby or not - the standby is already scheduled. So this is another rare timing issue that we have to take care of (not sure how to do it but xmltv should not attempt a new import while a standby is in progress).:(

    See if you can manage to reproduce the previous case where standby is initiated after xmltv.
     

    Users who are viewing this thread

    Top Bottom