I have a Django app that uses MySQL and the InnoDB engine for storage. For some reason, Django sometimes leaves locks in place, even after the query has completed. (I can see them with Innotop).
The only transaction-handling stuff that I do in my code is that I have django.db.transaction.commit_on_success specified for some of my save() methods where I am working with multi-table inheritance.
If I restart the Apache server, the locks go away.
Has anyone seen something like this? Could I have written in some anti-pattern that would cause this?