This is a patch for a non excisting mantis ....
Hope no one gets pisses.
The current timeout for the wake on lan is set at 10 seconds, which is already very short for a system resuming from sleep let alone a system resuming from hibernating.
the current code is :
try
{
hwAddress = wakeOnLanManager.GetHwAddrBytes(macAddress);
//Finally, start up the TV server
Log.Info("TVHome: WOL - Start the TV server");
if (wakeOnLanManager.WakeupSystem(hwAddress, RemoteControl.HostName, 10))
{
Log.Info("TVHome: WOL - The TV server started successfully!");
}
}
catch (Exception ex)
{
Log.Error("TVHome: WOL - Failed to start the TV server - {0}", ex.Message);
}
i'm not sure what this code is trying to catch but i think the catch should be the else statement. and the timeout parameter which is set at 10 seconds should be at least 30 seconds. If i resume my system from hibernation it takes 140 seconds ... well i guess not much people have a TV server with 12 Gig around, but it gives the timeshift ramdisk a bit of space
If i use the sleep mode which i normally do, it takes about 25 seconds for the system to reply to a ping request, using the current code (SVN 25557) gives the following error in the log :
##########################################################################
2010-04-16 22:44:40.498266 [Debug][MPMain(1)]: WOLMgr: System 192.168.2.160 still not reachable, waiting...
2010-04-16 22:44:41.498323 [Debug][MPMain(1)]: TVHome: HeartBeat Transmitter started.
2010-04-16 22:44:41.499323 [Debug][MPMain(1)]: ChannelNavigator: ctor()
2010-04-16 22:44:41.506324 [Info.][MPMain(1)]: get channels from database
2010-04-16 22:44:54.644075 [Info.][TvClient-TvHome: HeartBeat transmitter thread(6)]: TVHome: OnRemotingConnected, recovered from a disconnection
2010-04-16 22:45:02.946550 [Info.][MPMain(1)]: TVHome: Error in Reload
2010-04-16 22:45:02.950550 [Info.][MPMain(1)]: Exception :Error: DatabaseUnavailableUnclassified
Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
Check the connection string: Server=Media-Server;Database=MpTvDb;User ID=root;Password=***;charset=utf8;Connection Timeout=300; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Gentle.Provider.MySQL.MySQLProvider.GetConnection()
#################################################################################
and alot more MySql errors.
If i add an else to the if statement it will at least tell me something, correct or not, but i know at where i am.
If i enlarge the timeout parameter, to 30, entering the TV home screen (on my system), everything is ok.
And offcourse the logging is oke too.
For people using the hibernate option on the TV server this parameter should perhaps be raised more let say to 60 seconds.
In my patch i left the catch intact as i'm not sure what it's trying to catch (but i'm afraid there's nothing to catch) i added an else to it and increased the timeout to 60 seconds.
Hope this help you to get a beter resume on the TV server side, and a cleaner log.
Hope no one gets pisses.
The current timeout for the wake on lan is set at 10 seconds, which is already very short for a system resuming from sleep let alone a system resuming from hibernating.
the current code is :
try
{
hwAddress = wakeOnLanManager.GetHwAddrBytes(macAddress);
//Finally, start up the TV server
Log.Info("TVHome: WOL - Start the TV server");
if (wakeOnLanManager.WakeupSystem(hwAddress, RemoteControl.HostName, 10))
{
Log.Info("TVHome: WOL - The TV server started successfully!");
}
}
catch (Exception ex)
{
Log.Error("TVHome: WOL - Failed to start the TV server - {0}", ex.Message);
}
i'm not sure what this code is trying to catch but i think the catch should be the else statement. and the timeout parameter which is set at 10 seconds should be at least 30 seconds. If i resume my system from hibernation it takes 140 seconds ... well i guess not much people have a TV server with 12 Gig around, but it gives the timeshift ramdisk a bit of space
If i use the sleep mode which i normally do, it takes about 25 seconds for the system to reply to a ping request, using the current code (SVN 25557) gives the following error in the log :
##########################################################################
2010-04-16 22:44:40.498266 [Debug][MPMain(1)]: WOLMgr: System 192.168.2.160 still not reachable, waiting...
2010-04-16 22:44:41.498323 [Debug][MPMain(1)]: TVHome: HeartBeat Transmitter started.
2010-04-16 22:44:41.499323 [Debug][MPMain(1)]: ChannelNavigator: ctor()
2010-04-16 22:44:41.506324 [Info.][MPMain(1)]: get channels from database
2010-04-16 22:44:54.644075 [Info.][TvClient-TvHome: HeartBeat transmitter thread(6)]: TVHome: OnRemotingConnected, recovered from a disconnection
2010-04-16 22:45:02.946550 [Info.][MPMain(1)]: TVHome: Error in Reload
2010-04-16 22:45:02.950550 [Info.][MPMain(1)]: Exception :Error: DatabaseUnavailableUnclassified
Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
Check the connection string: Server=Media-Server;Database=MpTvDb;User ID=root;Password=***;charset=utf8;Connection Timeout=300; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Gentle.Provider.MySQL.MySQLProvider.GetConnection()
#################################################################################
and alot more MySql errors.
If i add an else to the if statement it will at least tell me something, correct or not, but i know at where i am.
If i enlarge the timeout parameter, to 30, entering the TV home screen (on my system), everything is ok.
And offcourse the logging is oke too.
For people using the hibernate option on the TV server this parameter should perhaps be raised more let say to 60 seconds.
In my patch i left the catch intact as i'm not sure what it's trying to catch (but i'm afraid there's nothing to catch) i added an else to it and increased the timeout to 60 seconds.
Hope this help you to get a beter resume on the TV server side, and a cleaner log.