I want the slow queries written down before I start guessing. MySQL and MariaDB can switch the log on while the server runs.
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE 'slow_query_log_file';
Every statement that takes longer than long_query_time seconds is appended to the file named by the last command. The shell tool mysqldumpslow on the server groups similar queries and sorts them by total time, which is easier than reading the log.
SET GLOBAL is lost at the next restart, so put slow_query_log = 1 and long_query_time = 1 in the server config once you are happy with them. A new long_query_time only applies to connections opened after the change.
Further reading: MySQL Reference Manual: The Slow Query Log