Instability investigation #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@theoryshaw asked me to look into the poor performance of this instance.
Looking at the admin dashboard, I couldn't spot anything abnormal (the memory Garbage Collection might be a bit too high, but nothing conclusive).
Logging in with ssh, it appears that the vm was "swaping" (storing parts of the memory on disk instead of RAM, which usually results in poor performance). After running
sudo swapoff -a && sudo swapon -a, the swap was cleared:To deter linux from using the swap too soon, I also reduced the vm.swapiness to
10(from its default value of60), by editing/etc/sysctl.confand reloading the settings withsudo sysctl --system.The current value can be checked with
sysctl vm.swappiness(orcat /proc/sys/vm/swappiness), which now both output10.A couple of minutes later, the swap is being used again:
Trying to find the process responsible for swap usage:
So mariadb seems to go easily to swap.
The theorical RAM usage of mariadb does not seem too high:
A bit later, the swap is being used even more, but mainly by the
giteaprocess:Use the
GOMEMLIMITenv var to try to reduce RAM consumption of Forgejo. In/etc/systemd/system/gitea.service, adjust theServiceSection:The instance has been upgraded to an instance with 4GB of RAM (instead of 2GB). The DNS were updated accordingly.
The
/etc/systemd/system/gitea.servicefile has been adjusted toGOMEMLIMIT=2000MiB.Swap is still in use, but the instance seems to stay responsive:
I suspect the LFS features to be heavy RAM consumers (should be investigated on the Forgejo side).
I took a look at the requests happening on the instance and it seems that a couple of robots are indexing the content.
For instance https://developer.amazon.com/amazonbot is currently browsing https://hub.openingdesign.com/OpeningDesign/FreeMVD_Mirror
Maybe https://forgejo.org/docs/latest/admin/search-engines-indexation/ could be added to kindly ask some of them to go away.