Error 500 on login from web browser

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 12.1.39
How are you able to access your server: SSH

Describe your issue

Hello,
I clean my instance because I had troubles to get my emails. I did these commands

sudo apt clean
sudo apt autoclean
sudo rm -rf /var/cache/*
sudo journalctl --vacuum-size=200M
sudo find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;

After the clean up, my emails can be received now. But, I cannot connect to the user spaces from the web browser. I get this error on the screen :
[POST] “https://mydomain.fr/yunohost/portalapi/login”: 500

I try this command that I found on the yunohost site :

systemctl restart slapd

But it does not work.

The result of the diagnistic : https://paste.yunohost.org/raw/uwecifanuc

Since the cleanup I have some trouble to update the instance :

Thanks for your help because I have no idea how to solve this issue.