From cdaed113872f0615a0d2864cc54064a4432054c6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 3 Sep 2015 18:39:08 +0100 Subject: at last we can login and see objects ( friends is dead and disable in scenepresence) --- OpenSim/Framework/Communications/RestClient.cs | 8 +--- OpenSim/Framework/Console/CommandConsole.cs | 2 +- .../Framework/Monitoring/SimExtraStatsCollector.cs | 8 ++-- .../HttpServer/PollServiceRequestManager.cs | 56 +++------------------- OpenSim/Framework/VersionInfo.cs | 2 +- OpenSim/Framework/WebUtil.cs | 18 ++++--- 6 files changed, 21 insertions(+), 73 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 7c89e6b..807222b 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -388,10 +388,6 @@ namespace OpenSim.Framework.Communications m_log.Error(string.Format("[REST CLIENT] Error fetching resource from server: {0} ", _request.Address.ToString()), e); } } - - if (_response != null) - _response.Close(); - return null; } @@ -417,7 +413,7 @@ namespace OpenSim.Framework.Communications _request = (HttpWebRequest) WebRequest.Create(buildUri()); _request.KeepAlive = false; _request.ContentType = "application/xml"; - _request.Timeout = 30000; + _request.Timeout = 90000; _request.Method = RequestMethod; _asyncException = null; _request.ContentLength = src.Length; @@ -476,8 +472,6 @@ namespace OpenSim.Framework.Communications } } - _response.Close(); - if (_response != null) _response.Close(); diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 851fbed..d908b68 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -83,7 +83,7 @@ namespace OpenSim.Framework.Console = "To enter an argument that contains spaces, surround the argument with double quotes.\nFor example, show object name \"My long object name\"\n"; public const string ItemHelpText -= @"For more information, type 'help' to get a list of all commands, += @"For more information, type 'help ' to get a list of all commands, or type help ' where is one of the following:"; /// diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs index e4df7ee..b0fdc81 100755 --- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs @@ -281,10 +281,10 @@ namespace OpenSim.Framework.Monitoring activeScripts = stats.StatsBlock[19].StatValue; scriptLinesPerSecond = stats.StatsBlock[20].StatValue; m_frameDilation = stats.StatsBlock[22].StatValue; - m_usersLoggingIn = stats.StatsBlock[23].StatValue; - m_totalGeoPrims = stats.StatsBlock[24].StatValue; - m_totalMeshes = stats.StatsBlock[25].StatValue; - m_inUseThreads = stats.StatsBlock[26].StatValue; +// m_usersLoggingIn = stats.StatsBlock[23].StatValue; +// m_totalGeoPrims = stats.StatsBlock[24].StatValue; +// m_totalMeshes = stats.StatsBlock[25].StatValue; +// m_inUseThreads = stats.StatsBlock[26].StatValue; } /// diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 571e8d8..0e4323a 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -44,25 +44,6 @@ namespace OpenSim.Framework.Servers.HttpServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - /// - /// Is the poll service request manager running? - /// - /// - /// Can be running either synchronously or asynchronously - /// - public bool IsRunning { get; private set; } - - /// - /// Is the poll service performing responses asynchronously (with its own threads) or synchronously (via - /// external calls)? - /// - public bool PerformResponsesAsync { get; private set; } - - /// - /// Number of responses actually processed and sent to viewer (or aborted due to error). - /// - public int ResponsesProcessed { get; private set; } - private readonly BaseHttpServer m_server; private Dictionary> m_bycontext; @@ -74,7 +55,7 @@ namespace OpenSim.Framework.Servers.HttpServer private Thread[] m_workerThreads; private Thread m_retrysThread; - private bool m_running = true; + private bool m_running = false; private int slowCount = 0; private SmartThreadPool m_threadPool; @@ -84,37 +65,9 @@ namespace OpenSim.Framework.Servers.HttpServer BaseHttpServer pSrv, bool performResponsesAsync, uint pWorkerThreadCount, int pTimeout) { m_server = pSrv; - PerformResponsesAsync = performResponsesAsync; m_WorkerThreadCount = pWorkerThreadCount; m_workerThreads = new Thread[m_WorkerThreadCount]; -/* - StatsManager.RegisterStat( - new Stat( - "QueuedPollResponses", - "Number of poll responses queued for processing.", - "", - "", - "httpserver", - m_server.Port.ToString(), - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => stat.Value = m_requests.Count(), - StatVerbosity.Debug)); - - StatsManager.RegisterStat( - new Stat( - "ProcessedPollResponses", - "Number of poll responses processed.", - "", - "", - "httpserver", - m_server.Port.ToString(), - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => stat.Value = ResponsesProcessed, - StatVerbosity.Debug)); -*/ PollServiceHttpRequestComparer preqCp = new PollServiceHttpRequestComparer(); m_bycontext = new Dictionary>(preqCp); @@ -127,10 +80,12 @@ namespace OpenSim.Framework.Servers.HttpServer startInfo.ThreadPoolName = "PoolService"; m_threadPool = new SmartThreadPool(startInfo); + } public void Start() { + m_running = true; m_threadPool.Start(); //startup worker threads for (uint i = 0; i < m_WorkerThreadCount; i++) @@ -154,12 +109,13 @@ namespace OpenSim.Framework.Servers.HttpServer true, null, 1000 * 60 * 10); + } private void ReQueueEvent(PollServiceHttpRequest req) { - if (IsRunning) + if (m_running) { lock (m_retryRequests) m_retryRequests.Enqueue(req); @@ -207,7 +163,7 @@ namespace OpenSim.Framework.Servers.HttpServer public void EnqueueInt(PollServiceHttpRequest req) { - if (IsRunning) + if (m_running) { if (req.PollServiceArgs.Type != PollServiceEventArgs.EventType.LongPoll) { diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index f0ea96f..165b2b4 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - public const string VersionNumber = "0.8.2.0CM"; + public const string VersionNumber = "0.8.2.0"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 44d9318..f834baa 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -86,7 +86,7 @@ namespace OpenSim.Framework /// Number of milliseconds a call can take before it is considered /// a "long" call for warning & debugging purposes /// - public const int LongCallTime = 500; + public const int LongCallTime = 3000; /// /// The maximum length of any data logged because of a long request time. @@ -418,7 +418,7 @@ namespace OpenSim.Framework /// public static OSDMap PostToService(string url, NameValueCollection data) { - return ServiceFormRequest(url,data, 20000); + return ServiceFormRequest(url,data, 30000); } public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) @@ -808,7 +808,7 @@ namespace OpenSim.Framework /// /// /// - /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) + /// Request timeout in seconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) /// /// /// @@ -877,7 +877,7 @@ namespace OpenSim.Framework requestStream.Write(data, 0, length); // capture how much time was spent writing -// tickdata = Util.EnvironmentTickCountSubtract(tickstart); + tickdata = Util.EnvironmentTickCountSubtract(tickstart); request.BeginGetResponse(delegate(IAsyncResult ar) { @@ -992,9 +992,9 @@ namespace OpenSim.Framework } else if (WebUtil.DebugLevel >= 4) { - m_log.DebugFormat( - "[WEB UTIL]: HTTP OUT {0} took {1}ms", - reqnum, tickdiff); + m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} took {1}ms, {2}ms writing", + + reqnum, tickdiff, tickdata); } } finally @@ -1054,8 +1054,6 @@ namespace OpenSim.Framework { writer.Write(obj); writer.Flush(); - if (WebUtil.DebugLevel >= 5) - WebUtil.LogOutgoingDetail(buffer); } length = (int)obj.Length; @@ -1248,7 +1246,7 @@ namespace OpenSim.Framework auth.AddAuthorization(ht.Headers); if (pTimeout != 0) - ht.Timeout = pTimeout; + request.Timeout = pTimeout * 1000; if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections) ht.ServicePoint.ConnectionLimit = maxConnections; -- cgit v1.1