MARIADB server is not running

A constant problem, first there is a 504 error on the sites, then I go to the control panel and the MARIADB server is not running. How to fix the problem?

check service status and logs.