Had the same issue; /var partition was full. Stopping and restarting web-server and database solved the problem.
systemctl stop nginx mariadb systemctl restart nginx mariadb
After a while the database could be accessed without dataloss.