We experienced this issue when trying to set a Business Space in Editing Mode.
The CPU usage for the java process skyrocketed and eventually it crashed. It made all business spaces inaccessible for a while for the end users.
We first thought it was a hard drive space issue so we freed up some space.
We then decided to double the vCPU cores and RAM even if we didn't believe in it. It did nothing.
The cause turned out to be a process that ended up in the execution_contexts table way too many times. We must have caused a loop at some point. At first we did not find this table. It resided inside the schema called basdbtest. We just ran a query to display all records and it was 3000+ rows of the same process name.
Thanks tford for mentioning the table name.
We are running MySQL and this is the command that resolved the issue for us:
SET SQL_SAFE_UPDATES = 0;
DELETE FROM execution_contexts WHERE PROCNAME='name_of_your_process';
We also restarted the server for good measure.
Have a nice weekend!