There is a very old system in the course log to prevent overloading the database. But it uses at the same time its own lock and the the queue of the task manager. Several concurrent course log archive tasks can overload the task manager 5 slots queue waiting for the 2 slots of the course log locking system.
Solution: remove the lock and send the task to the slow prio. queue (2 slots), replace the callback with an event.