Logrotate for mariadb can lock entire database
Mariadb packages (and possibly mysql, did not check) comme with a logrotate configuration which does a kill -1 in postrotate.
SIGHUP signal triggers a tables flush which is very dangerous when very long queries are running. The flush locks the entire database until the running queries are finished.
An alternative to kill -1 could be using the same postrotate as in the Mariadb provided packages : https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/, it only flush logs files and not the entire database.