Actions execution throws "MaxListenersExceededWarning"

Problem Statement

We have multiple Send Phone Message Actions enabled on our tenant. After enabling multiple Actions of the same trigger, I started getting warnings on the Realtime Webtask Log extension, specifically:

(node:18) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (Use node --trace-warnings … to show where the warning was created)

Symptoms

  • (node:18) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (Use node --trace-warnings … to show where the warning was created)

Steps to Reproduce

  1. Create two Actions with a console.log() statement. For example in a Post Login Action script:
exports.onExecutePostLogin = async (event, api) => {
  console.log('ACTION ******* onExecutePostLogin *******');
};
  1. Open the Real-time Webtask Logs Extension

  2. Perform login multiple times and observe the Real-time Webtask Logs Extension logs

After some, you will see the “MaxListenersExceededWarning” on the Real-time Webtask Logs Extension

Cause

This error is a warning that is related to some of the necessary wrapping business logic for Actions and should not have any impact.

Solution

Since this is just a warning, we recommend ignoring this warning message for now. Having said that our Engineering teams will be working on an improvement for this behavior.

1 Like