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.
arthursv
Melanie 2009-08-14 14:18:56 +01:00
parent 6ece8d86e0
commit 7a2a2e68e7
4 changed files with 15 additions and 19 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -42,16 +42,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public partial class ScriptBaseClass : MarshalByRefObject, IScript
{
private Dictionary<string, MethodInfo> inits = new Dictionary<string, MethodInfo>();
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<string, object> GetVars()

View File

@ -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;
}
}
}