From 7a2a2e68e7e235b9d79c09d98a4cf0b6f87a2a85 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Aug 2009 14:18:56 +0100 Subject: Remove the script sponsor logic because scripts are timing out again. This needs to be looked into. This commit, unfortunately, reinstates a memory leak in regions that see significant script fluctuation, e.g. lots of scripted attachments, or script development. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 +++--- .../Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 15 ++++++++------- .../Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 7 +------ 4 files changed, 15 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ff85b96..691732a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -125,9 +125,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (lease.CurrentState == LeaseState.Initial) { - lease.InitialLeaseTime = TimeSpan.FromMinutes(1.0); - lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); - lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); + lease.InitialLeaseTime = TimeSpan.FromMinutes(0); +// lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); +// lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); } return lease; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6539bda..6e3a3ab 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -166,9 +166,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (lease.CurrentState == LeaseState.Initial) { - lease.InitialLeaseTime = TimeSpan.FromMinutes(1.0); - lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); - lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); + lease.InitialLeaseTime = TimeSpan.FromMinutes(0); +// lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); +// lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); } return lease; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index d119a77..838cafb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -42,16 +42,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public partial class ScriptBaseClass : MarshalByRefObject, IScript { private Dictionary inits = new Dictionary(); - private ScriptSponsor m_sponser; +// private ScriptSponsor m_sponser; public override Object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (lease.CurrentState == LeaseState.Initial) { - lease.InitialLeaseTime = TimeSpan.FromMinutes(1.0); - lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); - lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); + // Infinite + lease.InitialLeaseTime = TimeSpan.FromMinutes(0); +// lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); +// lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); } return lease; } @@ -79,7 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } } - m_sponser = new ScriptSponsor(); +// m_sponser = new ScriptSponsor(); } private Executor m_Executor = null; @@ -112,7 +113,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return; ILease lease = (ILease)RemotingServices.GetLifetimeService(data as MarshalByRefObject); - lease.Register(m_sponser); +// lease.Register(m_sponser); MethodInfo mi = inits[api]; @@ -126,7 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public void Close() { - m_sponser.Close(); +// m_sponser.Close(); } public Dictionary GetVars() diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 4211ced..7bbaac0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -53,7 +53,7 @@ using OpenSim.Region.ScriptEngine.Interfaces; namespace OpenSim.Region.ScriptEngine.Shared.Instance { - public class ScriptInstance : MarshalByRefObject, IScriptInstance, ISponsor + public class ScriptInstance : MarshalByRefObject, IScriptInstance { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -1006,10 +1006,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { return true; } - - public TimeSpan Renewal(ILease lease) - { - return lease.InitialLeaseTime; - } } } -- cgit v1.1 From a851b68333756d11be2c5afe2aa76c58ae771b4b Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Aug 2009 14:27:56 +0100 Subject: Remove one more sponsor reference --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 7bbaac0..225126d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance "SecondLife.Script"); ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); - lease.Register(this); +// lease.Register(this); } catch (Exception) { -- cgit v1.1