YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

Very high usage of CPU that creates high iowait #277

Closed Thatoo closed 3 years ago

Thatoo commented 3 years ago

Describe the bug

Synapse v 1.35 is using very high CPU and create high iowait

Context

Steps to reproduce

Expected behavior

CPU usage should increase a bit but not that much and iowait should reduce below 1 soon

Logs

https://paste.yunohost.org/ivedupejer

image

Thatoo commented 3 years ago

I discovered that because I'm experimenting problem to decrypt message coming from matrix.org friend's account. Encrypted message from my home server and an other small server are well decrypted and room are fast but encrypted message from matrix.org can't be decrypted and matrix.org room are slow...

I have no idea if their is a link between the two problems so I'm not entirely sure it's relevant but I feel it does because it happened at the same time. Few days ago, I didn't have any problem with any room or encryption and I didn't notice any high CPU/iowait problem. I was checking when I updated nextcloud from 20.0.8~ynh1 to 21.0.2~ynh1 because it didn't happen smoothly : https://github.com/YunoHost-Apps/nextcloud_ynh/issues/419#issuecomment-868435491

Could it be linked to these steps we have to do in order to operate nextcloud update (does it have an impact on synapse?)? :

$ php7.3 -i | grep apc.enable
apc.enable_cli => Off => Off
apc.enabled => On => On
$ # added apc.enable_cli=1 to /etc/php/7.3/cli/conf.d/20-apcu.ini
$ sudo service php7.3-fpm restart
$ php7.3 -i | grep apc.enable
apc.enable_cli => On => On
apc.enabled => On => On
Thatoo commented 3 years ago

Or could it be linked to

Over the last few days we've seen a distributed spam attack across the public Matrix network, where large numbers of spambots have been registered across servers with open registration and then used to flood abusive traffic into rooms such as Matrix HQ.

https://matrix.org/blog/2021/06/30/security-update-synapse-1-37-1-released

Thatoo commented 3 years ago

It was indeed linked to matrix.org server spam situation. As soon as I left the room #matrix:matrix.org , all problems disappeared

image .