ECA has a new container parameter,
eca.max_event_occurrences, which defaults to 10.
It caps how many times the same event object may sit on the execution stack at
the same time.
Why it exists
The existing eca.max_recursion_level parameter (default 1)
detects a repeating block on the stack. That does not actually bound
stack growth: two models triggering each other can recurse indefinitely while
never repeating a complete block, and the process runs until PHP exhausts memory
or the stack.
Counting occurrences closes that hole by construction. With the new
parameter, the stack is bounded at its value multiplied by the number of
distinct enabled event objects, regardless of the shape of the recursion.
The two rules are independent and both apply. The occurrence cap is not a
replacement for eca.max_recursion_level, and folding one into the
other would change when legitimate nesting is halted.
What you need to check
This can halt a model that previously worked. A model that
legitimately nests the same event more than ten levels deep - recursive
processing of a tree or a menu hierarchy, for example - is now stopped at the
tenth occurrence and logged as recursion, even though nothing is wrong.
If that describes a model of yours, raise the parameter. It is a container
parameter, not a UI setting, so it goes in a services file and requires a
container rebuild:
parameters:
eca.max_event_occurrences: 25
Raise it deliberately rather than as a reflex. The default of ten is high
enough that hitting it usually means the model really is recursing without a
terminating condition.