Memory and SWAP 100%

Faced similar situation. Its not ERPNext but MariaDB issue. On backup it takes the RAM but does not release it. There are many posts across the net with similar issue but no resolution.