From 2ab69e081674596352f3fd4a2af874fad9abfdcf Mon Sep 17 00:00:00 2001
From: erikjohnston HTTP request logs are written by synapse (see HTTP request logs are written by synapse (see See the following for how to decode the dense data available from the default logging configuration. It is possible to monitor much of the internal state of Synapse using Prometheus
-metrics and Grafana.
-A guide for configuring Synapse to provide metrics is available here
-and information on setting up Grafana is here.
+ It is possible to monitor much of the internal state of Synapse using Prometheus
+metrics and Grafana.
+A guide for configuring Synapse to provide metrics is available here
+and information on setting up Grafana is here.
In this setup, Prometheus will periodically scrape the information Synapse provides and
store a record of it over time. Grafana is then used as an interface to query and
present this information through a series of pretty graphs. Once you have grafana set up, and assuming you're using our grafana dashboard template, look for the following graphs when debugging a slow/overloaded Synapse: Once you have grafana set up, and assuming you're using our grafana dashboard template, look for the following graphs when debugging a slow/overloaded Synapse: This, along with the CPU and Memory graphs, is a good way to check the general health of your Synapse instance. It represents how long it takes for a user on your homeserver to send a message.Request log format
-synapse/http/site.py
for details).synapse/http/site.py
for details).2020-10-01 12:00:00,000 - synapse.access.http.8008 - 311 - INFO - PUT-1000- 192.168.0.1 - 8008 - {another-matrix-server.com} Processed request: 0.100sec/-0.000sec (0.000sec, 0.000sec) (0.001sec/0.090sec/3) 11B !200 "PUT /_matrix/federation/v1/send/1600000000000 HTTP/1.1" "Synapse/1.20.1" [0 dbevts]
-AAAAAAAAAAAAAAAAAAAAA- -BBBBBBBBBBBBBBBBBBBBBB- -C- -DD- -EEEEEE- -FFFFFFFFF- -GG- -HHHHHHHHHHHHHHHHHHHHHHH- -IIIIII- -JJJJJJJ- -KKKKKK-, -LLLLLL- -MMMMMMM- -NNNNNN- O -P- -QQ- -RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR- -SSSSSSSSSSSS- -TTTTTT-
diff --git a/develop/usage/administration/state_groups.html b/develop/usage/administration/state_groups.html
index fec832e376..5f364c7ab2 100644
--- a/develop/usage/administration/state_groups.html
+++ b/develop/usage/administration/state_groups.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/usage/administration/understanding_synapse_through_grafana_graphs.html b/develop/usage/administration/understanding_synapse_through_grafana_graphs.html
index bbbca9f03b..051d85c464 100644
--- a/develop/usage/administration/understanding_synapse_through_grafana_graphs.html
+++ b/develop/usage/administration/understanding_synapse_through_grafana_graphs.html
@@ -124,10 +124,10 @@
-
+
-
+
@@ -160,14 +160,14 @@
Understanding Synapse through Grafana graphs
-Message Event Send Time
This is quite a useful graph. It shows how many times Synapse attempts to retrieve a piece of data from a cache which the cache did not contain, thus resulting in a call to the database. We can see here that the _get_joined_profile_from_event_id
cache is being requested a lot, and often the data we're after is not cached.
Cross-referencing this with the Eviction Rate graph, which shows that entries are being evicted from _get_joined_profile_from_event_id
quite often:
we should probably consider raising the size of that cache by raising its cache factor (a multiplier value for the size of an individual cache). Information on doing so is available here (note that the configuration of individual cache factors through the configuration file is available in Synapse v1.14.0+, whereas doing so through environment variables has been supported for a very long time). Note that this will increase Synapse's overall memory usage.
+we should probably consider raising the size of that cache by raising its cache factor (a multiplier value for the size of an individual cache). Information on doing so is available here (note that the configuration of individual cache factors through the configuration file is available in Synapse v1.14.0+, whereas doing so through environment variables has been supported for a very long time). Note that this will increase Synapse's overall memory usage.
Forward extremities are the leaf events at the end of a DAG in a room, aka events that have no children. The more that exist in a room, the more state resolution that Synapse needs to perform (hint: it's an expensive operation). While Synapse has code to prevent too many of these existing at one time in a room, bugs can sometimes make them crop up again.
If a room has >10 forward extremities, it's worth checking which room is the culprit and potentially removing them using the SQL queries mentioned in #1760.
Large spikes in garbage collection times (bigger than shown here, I'm talking in the -multiple seconds range), can cause lots of problems in Synapse performance. It's more an +
Large spikes in garbage collection times (bigger than shown here, I'm talking in the +multiple seconds range), can cause lots of problems in Synapse performance. It's more an indicator of problems, and a symptom of other problems though, so check other graphs for what might be causing it.
If you're still having performance problems with your Synapse instance and you've +
If you're still having performance problems with your Synapse instance and you've tried everything you can, it may just be a lack of system resources. Consider adding -more CPU and RAM, and make use of worker mode +more CPU and RAM, and make use of worker mode to make use of multiple CPU cores / multiple machines for your homeserver.
diff --git a/develop/usage/administration/useful_sql_for_admins.html b/develop/usage/administration/useful_sql_for_admins.html index d2f0305bae..ce31570096 100644 --- a/develop/usage/administration/useful_sql_for_admins.html +++ b/develop/usage/administration/useful_sql_for_admins.html @@ -124,10 +124,10 @@ - + - + diff --git a/develop/usage/configuration/config_documentation.html b/develop/usage/configuration/config_documentation.html index e8d3e29949..7f69e9c9b6 100644 --- a/develop/usage/configuration/config_documentation.html +++ b/develop/usage/configuration/config_documentation.html @@ -124,10 +124,10 @@ - + - + @@ -1367,7 +1367,7 @@ caches:If you are running multiple workers, you must individually update the worker config file and send this signal to each worker process.
-If you're using the example systemd service +
If you're using the example systemd service
file in Synapse's contrib
directory, you can send a SIGHUP
signal by using
systemctl reload matrix-synapse
.
sentry
Use this option to enable sentry integration. Provide the DSN assigned to you by sentry
-with the dsn
setting.
dsn
setting.
An optional environment
field can be used to specify an environment. This allows
for log maintenance based on different environments, ensuring better organization
and analysis..