`events.push(...arr)` puts all arguments on the call stack before calling the method, which causes the error. Don't push tens of thousands of items at once.
If you're architecture is based on event sourcing, this is kind of the point
If you're architecture is based on event sourcing, this is kind of the point