mirror of https://github.com/zulip/zulip.git
d47637fa40
SIGALRM is the simplest way to set a specific maximum duration that queue workers can take to handle a specific message. This only works in non-threaded environments, however, as signal handlers are per-process, not per-thread. The MAX_CONSUME_SECONDS is set quite high, at 10s -- the longest average worker consume time is embed_links, which hovers near 1s. Since just knowing the recent mean does not give much information[1], it is difficult to know how much variance is expected. As such, we set the threshold to be such that only events which are significant outliers will be timed out. This can be tuned downwards as more statistics are gathered on the runtime of the workers. The exception to this is DeferredWorker, which deals with quite-long requests, and thus has no enforceable SLO. [1] https://www.autodesk.com/research/publications/same-stats-different-graphs |
||
---|---|---|
.. | ||
__init__.py | ||
add_mock_conversation.py | ||
add_new_realm.py | ||
add_new_user.py | ||
add_remote_server.py | ||
calculate_first_visible_message_id.py | ||
compare_messages.py | ||
invoice_plans.py | ||
mark_all_messages_unread.py | ||
migrate_stream_notifications.py | ||
populate_db.py | ||
print_initial_password.py | ||
profile_request.py | ||
queue_rate.py | ||
render_messages.py | ||
sync_api_key.py |