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

同时运行的进程数是有限制的。 #11

Open
Tzdy opened this issue Jan 20, 2023 · 0 comments
Open

同时运行的进程数是有限制的。 #11

Tzdy opened this issue Jan 20, 2023 · 0 comments

Comments

@Tzdy
Copy link
Owner

Tzdy commented Jan 20, 2023

可以通过ulimit -u查看最大运行数。

nodejs在用child_process调用其他二进制文件时(eg.. git, wc),会受到最大进程的影响,如果达到最大进程数,就会报错.

Error: read ENOTCONN
    at tryReadStart (node:net:614:20)
    at Socket._read (node:net:625:5)
    at Socket.Readable.read (node:internal/streams/readable:487:10)
    at Socket.read (node:net:666:39)
    at new Socket (node:net:415:12)
    at Object.Socket (node:net:286:41)
    at createSocket (node:internal/child_process:328:14)
    at ChildProcess.spawn (node:internal/child_process:445:23)
    at spawn (node:child_process:700:9)
    at /Users/mac/Documents/web/server/gogs/ty-git/dist/git.js:59:46
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -57,
  code: 'ENOTCONN',
  syscall: 'read'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant