I have a scaling issue with an application, it uses Aurora as the DB and uses Slick as the ORM. I am not sure where the issue lies but I have a question releated to MySQL / Aurora that I hope will shed some light on my issue.
The application needs a significant number of connections in the pool otherwise the application starts failing. However the when I look at INFORMATION_SCHEMA.PROCESSLIST I can see a significant number of threads in the 'cleaned up' state.
I can't see 'cleaned up' on the list of general states - https://dev.mysql.com/doc/refman/5.7/en/general-thread-states.html
What does 'cleaned up' mean exactly? ( I can guess but I can't find any documentation )
below is a count of the number of threads total vs the number in 'cleaned up'
mysql> select count(*) from INFORMATION_SCHEMA.PROCESSLIST where STATE = 'cleaned up' order by time desc ;
+----------+
| count(*) |
+----------+
| 11982 |
+----------+
1 row in set (0.08 sec)
mysql> select count(*) from INFORMATION_SCHEMA.PROCESSLIST order by time desc ;
+----------+
| count(*) |
+----------+
| 12007 |
+----------+
1 row in set (0.08 sec)