strace shows long time reading from mysql socket - mysql takes long time to execute query?
Solution 1:
The issue is resolved. I looked through the PROCESSLIST
table in information_schema
MySQL database and found that some tables are locked with the state Waiting for table level lock
. So then I searched and found that one reason for the lock can be mysqldump backups - and this is exactly what I had configured recently. But because the job was misconfigured, it ran every minute constantly locking MySQL. Now that backups are configured correctly, the server works fine.
Yet the second question with poll
remains unresolved.