by Ken Task.
For some reason, sometimes, using the Moodle UI to purge caches didn't work for me but manually removing them via command line does for sure.
Might be related to mysql innodb session lock variable:
innodb_lock_wait_timeout
Restart your mysql and let's see what happens! ;)
Did see a tracker item that was similar for 2.6 but they show that resolved and it had to do with course backups on Winders.
'spirit of sharing', Ken