Network connection issues Error: getaddrinfo EMFILE #4926
-
Version17.0.1 PlatformDocker container on Linux SubsystemGetAddrInfoReqWrap.onlookup [as oncomplete] What steps will reproduce the bug?I boot frontend application container and backend application container on docker engine in Linux. How often does it reproduce? Is there a required condition?Twice in 2 months. What is the expected behavior?This frontend application container can connects to backend application container on docker network. What do you see instead?I'm getting these stack traces:
Additional informationDocker logs shows "EMFILE: too many open files". |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 9 replies
-
Using docker image is node:17.0.1 from dockerhub |
Beta Was this translation helpful? Give feedback.
-
EMFILE indicates that the number of files your process have opened has reached the upper limit. Perhaps you can run |
Beta Was this translation helpful? Give feedback.
-
Thanks for your comment! |
Beta Was this translation helpful? Give feedback.
-
I've converted this to a discussion as there's no reason to believe it's a bug in node itself. |
Beta Was this translation helpful? Give feedback.
-
Can I solve this problem if I use latest version? |
Beta Was this translation helpful? Give feedback.
-
I found that my program was actually leaking file descriptors due to a elementary bug on writing logs. |
Beta Was this translation helpful? Give feedback.
I found that my program was actually leaking file descriptors due to a elementary bug on writing logs.
As a matter of fact, my program open local file to write logs by log4js-node library.
It open log file whenever it write logs. Therefore this problem has occurred because file descriptors was being wasted.
I fix my program and I'd like to keep an eye on it for a while.