From b5062ae7ee4067158f255a0d62fb87b8eaf9d1d6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 18 Jul 2013 13:30:04 -0700 Subject: Changed the timoeut of EQ 502s (no events) to 50 secs. The viewer post requests timeout in 60 secs. There's plenty of room for improvement in handling the EQs. Some other time... --- .../Framework/Servers/HttpServer/PollServiceRequestManager.cs | 2 +- .../ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index c50df5a..e811079 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -118,7 +118,7 @@ namespace OpenSim.Framework.Servers.HttpServer // The only purpose of this thread is to check the EQs for events. // If there are events, that thread will be placed in the "ready-to-serve" queue, m_requests. // If there are no events, that thread will be back to its "waiting" queue, m_longPollRequests. - // All other types of tasks (Inventory handlers) don't have the long-poll nature, + // All other types of tasks (Inventory handlers, http-in, etc) don't have the long-poll nature, // so if they aren't ready to be served by a worker thread (no events), they are placed // directly back in the "ready-to-serve" queue by the worker thread. while (m_running) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index f0445ff..c5e28ad 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -65,6 +65,13 @@ namespace OpenSim.Region.ClientStack.Linden /// public int DebugLevel { get; set; } + // Viewer post requests timeout in 60 secs + // https://bitbucket.org/lindenlab/viewer-release/src/421c20423df93d650cc305dc115922bb30040999/indra/llmessage/llhttpclient.cpp?at=default#cl-44 + // + private const int VIEWER_TIMEOUT = 60 * 1000; + // Just to be safe, we work on a 10 sec shorter cycle + private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000); + protected Scene m_scene; private Dictionary m_ids = new Dictionary(); @@ -363,8 +370,8 @@ namespace OpenSim.Region.ClientStack.Linden } caps.RegisterPollHandler( - "EventQueueGet", - new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, 40000)); + "EventQueueGet", + new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS)); Random rnd = new Random(Environment.TickCount); lock (m_ids) -- cgit v1.1