Multiple connections Nextcloud

Salvation!
This is the first time that I appeal to the community.

I run a nextcloud for a school and yesterday at certain times of the day it was very difficult to access. (start of school closure …)

After some research, I think it’s from MariaDB, probably a conf to review …
Because when accessing the nextcloud directory it’s verry slow but the Apache home page is correct, SSH access, and more is very good.
However, access to phpMyAdmin beug also.

Do you have any ideas?

Conf maria-db: https://pastebin.com/jspmhVFP
Server conf:
16 GB DDR4 - 8vCPU (2.6Ghz) - 250GB SSD - 250Mbps connection
I would say there are around 150-200 connections during the big slowdown.