Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] MaxListenersExceeded when trying to bump to Rush v5.147.1 #5061

Closed
aramissennyeydd opened this issue Dec 27, 2024 · 2 comments · Fixed by #5073
Closed

[rush] MaxListenersExceeded when trying to bump to Rush v5.147.1 #5061

aramissennyeydd opened this issue Dec 27, 2024 · 2 comments · Fixed by #5073

Comments

@aramissennyeydd
Copy link
Contributor

Summary

I'm trying to upgrade from 5.141.3 to 5.147.1 and noticing a bunch of (node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit messages in the logs in CI. Possibly related to #5027 as we are using the HTTP build cache plugin.

Repro steps

Expected result: No error message emitted.

Actual result:
This is especially noticeable for cobuild agents that are waiting on other agents to finish work.

==[ @company/heft-custom-plugin (phase) ]====================[ 51 of 1112 ]==
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:7835) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

Details

Glancing through the PR that added the WebClient, it may be this line, https://github.com/microsoft/rushstack/pull/5031/files#diff-8df196227043924adc8887e26f2224e47811b41b87cc5d9824fd6431b9233f71R202-R209. Our build cache config is pretty standard, we use Artifactory to store assets to,

{
  "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/build-cache.schema.json",
  "buildCacheEnabled": true,
  "cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]",

  "cacheProvider": "http",

  "httpConfiguration": {
    "url": "https://company.jfrog.io/artifactory/rush-cache-local",
    "isCacheWriteAllowed": false
  }
}

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.147.1
rushVersion from rush.json? 5.147.1
useWorkspaces from rush.json? true
Operating system? Linux
Would you consider contributing a PR? Yes
Node.js version (node -v)? 20.12.2
@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Dec 27, 2024
@aramissennyeydd aramissennyeydd changed the title [rush] [rush] MaxListenersExceeded when trying to bump to Rush v5.147.1 Dec 27, 2024
@aramissennyeydd
Copy link
Contributor Author

From a --trace-warnings, it looks like the issue is coming from

socket.on('error', (error: Error) => {
reject(error);
});
.

@iclanton
Copy link
Member

iclanton commented Jan 6, 2025

Hmm. I wonder if these handlers need to be explicitly cleaned up. @D4N14L - care to take a look?

@iclanton iclanton moved this from Needs triage to Needs Investigation in Bug Triage Jan 6, 2025
@github-project-automation github-project-automation bot moved this from Needs Investigation to Closed in Bug Triage Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants