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 ++++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') 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() -- cgit v1.1