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

E2BIG exception on large proccesslists #968

Open
sskomudekdevcups opened this issue Feb 11, 2025 · 0 comments
Open

E2BIG exception on large proccesslists #968

sskomudekdevcups opened this issue Feb 11, 2025 · 0 comments

Comments

@sskomudekdevcups
Copy link

On a host with many running proccesses, si.processes() crashes with E2BIG error.

To Reproduce
Steps to reproduce the behavior:

const si = require('systeminformation');

si.processes()
  .then(data => {
    console.log("Process List:");
    console.log(JSON.stringify(data, null, 2));
  })
  .catch(error => {
    console.error("Error retrieving processes:", error);
  });

On a server with 16k+ running proccesses:

node:internal/child_process:414
    throw errnoException(err, 'spawn');
    ^

Error: spawn E2BIG
    at ChildProcess.spawn (node:internal/child_process:414:11)
    at spawn (node:child_process:761:9)
    at Object.execFile (node:child_process:351:17)
    at exec (node:child_process:234:25)
    at /root/temp/node_modules/systeminformation/lib/processes.js:768:17
    at ChildProcess.exithandler (node:child_process:414:7)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5) {
  errno: -7,
  code: 'E2BIG',
  syscall: 'spawn'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant