In our database (MySQL 5.6.22 on RDS) we have a lot of transactions (~500) in a state "cleaning up" under the load:
> SHOW ENGINE innodb STATUS; ... ------------ TRANSACTIONS ------------ ... ---TRANSACTION 70150348714, not started MySQL thread id 132590, OS thread handle 0x2b2a712ca700, query id 10842420427 <ip> <user> cleaning up ...
The only information I have found is:
The thread has processed one command and is preparing to free memory and reset certain state variables.
And this question comment mentions:
You may need to fine tune some memory related parameters if you see this often in your instance.
What could be the actual problem? Why are so many transactions in "cleaning up" state? What memory parameters can I fine tune to prevent it?
Any advice will be greatly appreciated.