Steps to reproduce:
1) limit the cache size, e.g. 2
2) deploy a number of processes that exceeds the cache size, e.g. 10
3) start one of the processes that are removed from the cache
Starting the process throws the following exception: ENGINE-16004 Exception while closing command context:
Should run without any problems.
The following test already reproduces the behavior: