From 3a2bd6c6e2ee23079d9cf802198740bf6a289b1b Mon Sep 17 00:00:00 2001
From: squahtx If your server already has an admin account you should use the user admin API to promote other accounts to become admins. See User Admin API If you don't have any admin accounts yet you won't be able to use the admin API so you'll have to edit the database manually. Manually editing the database is generally not recommended so once you have an admin account, use the admin APIs to make further changes. If your server already has an admin account you should use the User Admin API to promote other accounts to become admins. If you don't have any admin accounts yet you won't be able to use the admin API, so you'll have to edit the database manually. Manually editing the database is generally not recommended so once you have an admin account: use the admin APIs to make further changes. See https://github.com/matrix-org/synapse/blob/master/README.rst#password-reset Users can reset their password through their client. Alternatively, a server admin
+can reset a user's password using the admin API. Deleting your database is unlikely to make anything better. It's easy to make the mistake of thinking that you can start again from a clean slate by dropping your database, but things don't work like that in a federated network: lots of other servers have information about your server. You can also use the List Room API
and The typical failure mode here is that you send an invitation to someone
+to join a room or direct chat, but when they go to accept it, they get an
+error (typically along the lines of "Invalid signature"). They might see
+something like the following in their logs: This is normally caused by a misconfiguration in your reverse-proxy. See the reverse proxy docs and double-check that your settings are correct. First, ensure you are running the latest version of Synapse, using Python 3
+with a PostgreSQL database. Synapse's architecture is quite RAM hungry currently - we deliberately
+cache a lot of recent room data and metadata in RAM in order to speed up
+common requests. We'll improve this in the future, but for now the easiest
+way to either reduce the RAM usage (at the risk of slowing things down)
+is to set the almost-undocumented However, degraded performance due to a low cache factor, common on
+machines with slow disks, often leads to explosions in memory use due
+backlogged requests. In this case, reducing the cache factor will make
+things worse. Instead, try increasing it drastically. 2.0 is a good
+starting value. Using libjemalloc can also yield a significant
+improvement in overall memory use, and especially in terms of giving back
+RAM to the OS. To use it, the library must simply be put in the
+LD_PRELOAD environment variable when launching Synapse. On Debian, this
+can be done by installing the This made a significant difference on Python 2.7 - it's unclear how
+much of an improvement it provides on Python 3.x. If you're encountering high CPU use by the Synapse process itself, you
+may be affected by a bug with presence tracking that leads to a
+massive excess of outgoing federation requests (see discussion). If metrics
+indicate that your server is also issuing far more outgoing federation
+requests than can be accounted for by your users' activity, this is a
+likely cause. The misbehavior can be worked around by disabling presence
+in the Synapse config file: see here. If Synapse runs out of file handles, it typically fails badly - live-locking
+at 100% CPU, and/or failing to accept new TCP connections (blocking the
+connecting client). Matrix currently can legitimately use a lot of file handles,
+thanks to busy rooms like If you hit this failure mode, we recommend increasing the maximum number of
+open file handles to be at least 4096 (assuming a default of 1024 or 256).
+This is typically done by editing Separately, Synapse may leak file handles if inbound HTTP requests get stuck
+during processing - e.g. blocked behind a lock or talking to a remote server etc.
+This is best diagnosed by matching up the 'Received request' and 'Processed request'
+log lines and looking for any 'Processed request' lines which take more than
+a few seconds to execute. Please let us know at Admin FAQ
How do I become a server admin?
-UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
What servers are my server talking to?
@@ -166,8 +166,9 @@
What users are registered on my server?
-SELECT NAME from users;
Manually resetting passwords:
-Manually resetting passwords
+I have a problem with my server. Can I just delete my database and start again?
order_by
state_events
.People can't accept room invitations from me
+
+2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server <server> with key ed25519:a_EqML: Unable to verify signature for <server>
+
Help!! Synapse is slow and eats all my RAM/CPU!
+SYNAPSE_CACHE_FACTOR
environment
+variable. The default is 0.5, which can be decreased to reduce RAM usage
+in memory constrained environments, or increased if performance starts to
+degrade.libjemalloc1
package and adding this
+line to /etc/default/matrix-synapse
:
+LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
+
Running out of File Handles
+#matrix:matrix.org
containing hundreds of participating
+servers. The first time a server talks in a room it will try to connect
+simultaneously to all participating servers, which could exhaust the available
+file descriptors between DNS queries & HTTPS sockets, especially if DNS is slow
+to respond. (We need to improve the routing algorithm used to be better than
+full mesh, but as of March 2019 this hasn't happened yet)./etc/security/limits.conf
#synapse:matrix.org
if
+you see this failure mode so we can help debug it, however.
metrics
: (see the docs here),
replication
: (see the docs here).
replication
: (deprecated as of Synapse 1.18, see the docs here).
compress
: set to true to enable gzip compression on HTTP bodies for this resource. This is currently only supported with the
-client
, consent
and metrics
resources.
client
, consent
, metrics
and federation
resources.
redaction_retention_period
How long to keep redacted events in unredacted form in the database. After this period redacted events get replaced with their redacted form in the DB.
+Synapse will check whether the rentention period has concluded for redacted
+events every 5 minutes. Thus, even if this option is set to 0
, Synapse may
+still take up to 5 minutes to purge redacted events from the database.
Defaults to 7d
. Set to null
to disable.
Example configuration:
redaction_retention_period: 28d
@@ -832,7 +835,11 @@ the allowed_lifetime_min
and allowed_lifetime_max
conf
which are older than the room's maximum retention period. Synapse will also
filter events received over federation so that events that should have been
purged are ignored and not stored again.
-The message retention policies feature is disabled by default.
+The message retention policies feature is disabled by default. Please be advised
+that enabling this feature carries some risk. There are known bugs with the implementation
+which can cause database corruption. Setting retention to delete older history
+is less risky than deleting newer history but in general caution is advised when enabling this
+experimental feature. You can read more about this feature here.
This setting has the following sub-options:
-
@@ -1925,7 +1932,9 @@ their account.
(Servers handling the these requests must answer the /requestToken
endpoints defined
by the Matrix Identity Service API
specification.)
-Updated in Synapse 1.64.0: The email
option is deprecated.
+Deprecated in Synapse 1.64.0: The email
option is deprecated.
+Removed in Synapse 1.66.0: The email
option has been removed.
+If present, Synapse will report a configuration error on startup.
Example configuration:
account_threepid_delegates:
msisdn: http://localhost:8090 # Delegate SMS sending to this local process
@@ -3012,7 +3021,7 @@ user directory. Defaults to false.
user_consent
For detailed instructions on user consent configuration, see here.
Parts of this section are required if enabling the consent
resource under
-listeners
, in particular template_dir
and version
. # TODO: link listeners
+listeners
, in particular template_dir
and version
.
-
template_dir
: gives the location of the templates for the HTML forms.
@@ -3027,7 +3036,7 @@ parameter.
-
server_notice_content
: if enabled, will send a user a "Server Notice"
-asking them to consent to the privacy policy. The server_notices
section ##TODO: link
+asking them to consent to the privacy policy. The server_notices
section
must also be configured for this to work. Notices will not be sent to
guest users unless send_server_notice_to_guests
is set to true.
--
cgit 1.5.1