-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse is hammering the database with user directory updates #7154
Comments
Enabling the user directory has no effect on the frequency of the database requests. |
In fact, it looks like disabling it has no effect either: the user directory is still being updated :/ |
ah, |
As far as I understand #7133 we should put update_user_directory: false in every worker config to avoid them to update the user directory in parallel, but the main synapse process would still take care of it ? I had the impression it needs clarification since you also wrote that you disabled the user_directory globally. |
You only need it in the main config, but it's a bit more severe than it looks on the surface. My server doesn't require the user directory because it's all bots and no users, but other public homeservers will need the user directory. Unless those servers also deploy their own worker, their other workers will start hammering the database. If you do run a worker setup, it sounds like you'll also need a dedicated user directory worker now :( |
I don't think you need a dedicated user directory worker. You can just disable the user directory stuff for every worker and only the master will update the db, which will reduce the db load. That's what #7133 does. It changes the default value for the workers, so master defaults the user directory and other stuff to on, while the workers default to off. |
After upgrading from 1.11.0 to 1.12.0 the following is appearing quite a lot in the logs:
The database is showing at least 5x the amount of rejected updates, which appear to be coming from all the workers.
The user directory is disabled on this server.It was supposed to be disabled, but the wrong option was set. See comments.The text was updated successfully, but these errors were encountered: