Decrease idle event queue timeout back to 10 minutes.

(imported from commit 1ca1c99c013f3e7f7e70e1fd9c5386b0d5a27b98)
This commit is contained in:
Tim Abbott 2013-04-18 16:17:48 -04:00
parent aa75f51d5e
commit 5afe06e8cb
1 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,11 @@ import tornado
import random
import zephyr.lib.stats as stats
IDLE_EVENT_QUEUE_TIMEOUT_SECS = 7 * 24 * 60 * 60
# The idle timeout used to be a week, but we found that in that
# situation, queues from dead browser sessions would grow quite large
# due to the accumulation of message data in those queues.
IDLE_EVENT_QUEUE_TIMEOUT_SECS = 60 * 10
EVENT_QUEUE_GC_FREQ_MSECS = 1000 * 60 * 5
# The heartbeats effectively act as a server-side timeout for
# get_events(). The actual timeout value is randomized for each
# client connection based on the below value. We ensure that the
@ -125,8 +129,6 @@ def allocate_client_descriptor(user_profile_id, event_types, apply_markdown):
user_clients.setdefault(user_profile_id, []).append(client)
return client
EVENT_QUEUE_GC_FREQ_MSECS = 1000 * 60 * 60
def gc_event_queues():
start = time.time()
to_remove = set()