mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
Decrease idle event queue timeout back to 10 minutes.
(imported from commit 1ca1c99c013f3e7f7e70e1fd9c5386b0d5a27b98)
This commit is contained in:
@@ -14,7 +14,11 @@ import tornado
|
|||||||
import random
|
import random
|
||||||
import zephyr.lib.stats as stats
|
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
|
# The heartbeats effectively act as a server-side timeout for
|
||||||
# get_events(). The actual timeout value is randomized for each
|
# get_events(). The actual timeout value is randomized for each
|
||||||
# client connection based on the below value. We ensure that the
|
# 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)
|
user_clients.setdefault(user_profile_id, []).append(client)
|
||||||
return client
|
return client
|
||||||
|
|
||||||
EVENT_QUEUE_GC_FREQ_MSECS = 1000 * 60 * 60
|
|
||||||
|
|
||||||
def gc_event_queues():
|
def gc_event_queues():
|
||||||
start = time.time()
|
start = time.time()
|
||||||
to_remove = set()
|
to_remove = set()
|
||||||
|
|||||||
Reference in New Issue
Block a user