Comparison

mod_log_slow_events/README.markdown @ 2896:d276bf3f0464

mod_log_slow_events: Add README
author Matthew Wild <mwild1@gmail.com>
date Tue, 27 Feb 2018 14:02:26 +0000
comparison
equal deleted inserted replaced
2895:589cc51209f7 2896:d276bf3f0464
1 ---
2 labels:
3 - 'Stage-Stable'
4 summary: Log warning when event handlers take too long
5 ...
6
7 Introduction
8 ============
9
10 Most activities in Prosody take place within our built-in events framework, for
11 example stanza processing and HTTP request handling, authentication, etc.
12
13 Modules are able to execute code when an event occurs, and they should return
14 as quickly as possible. Poor performance (e.g. slow or laggy server) can be caused
15 by event handlers that are slow to respond.
16
17 This module is able to monitor how long each event takes to be processed, and
18 logs a warning if an event takes above a certain amount of time, including
19 providing any details about the event such as the user or stanza that triggered it.
20
21 The aim is to help debug why a server may not be as responsive as it should be,
22 and ultimately which module is to blame for that.
23
24 Configuration
25 ======================
26
27 There is a single configuration option:
28
29 ```
30 -- Set the number of seconds an event may take before
31 -- logging a warning (fractional values are ok)
32 log_slow_events_threshold = 0.5
33 ```
34
35 Metrics
36 =======
37
38 In addition to the log messages, a new 'slow_events' metric will be exported to
39 your configured stats backend (if any).
40
41 Compatibility
42 -------------
43
44 ------- --------------
45 trunk Works
46 0.10 Works
47 0.9 Doesn't work
48 0.8 Doesn't work
49 ------- --------------