undefined connect ENOBUFS
- Node.js Version: v9.8.0
- OS: Centos7.4
- Scope (install, code, runtime, meta, other?): Twitch Chat Bot
I'm getting this error while running 6 nodejs applications and research pointed me to a 'agent:false: option that I don't know how to apply.
When I run 4-5 nodejs applications this problem isn't present. I looked at my 'TIME_WAIT' connections and overall netstat of all connection is under 1k.
I'm running these applications on a VPS with 6CPU and 8GB of RAM. Yet this error says its running out of memory? I'm not sure what to try as nobody else is having this issue.
I'm running the following nodejs application - https://github.com/sogehige/sogeBot

I'm guessing your research was finding answers such as this, which were advocating use of agent: false in the context of an http.request(options[, callback]). Is your application based on use of an HTTP server at all? Doesn't sound like it necessarily is. Use of this option affects connection pooling in the http server. You may have to resolve the symptom arising from a similar, but different, implementation circumstance.
So I believe it does have an HTTP server which is the dashboard. Which keeps crashing. I have it running on 20001 - 20005 ports and use Nginx to proxy_pass to a domain name. Each port is a different nodejs application. I'm not very good with nodejs. I linked the github which has all the source code (not asking for you to look through it or anything) but just not sure what to do. Nobody else running the bot has this issue which makes me believe it is a configuration issue and was hoping to get pointed in the right direction.
When this happens it crashes the HTTP server and resets it almost. I get a 504 gateway error in Nginx.
and yes I found the link you sent me but have no idea how to even try it sadly. :(
I'm also using snekfetch for http requests. (v3.6.4)
The Node.js application running your 'Bot is likely also serving the dashboard via an HTTP server - I don't know if thats a separate (child?) process or not. However, for the dashboard, there might actually be some Nginx configuration related to your proxy that could be relevant, such as this.
And, is it crashing? It might be ending, but ending because of the cumulation of 'fatal' connectivity-related issues that might indeed stem from the ENOBUFS issue you first mentioned. That is, does the dashboard end at the same time as the Twitch Chat Bot is ending? Or, are they unrelated in timing (potential evidence of separate processes and separate causes)? (Is there evidence of a core file?)
I'm not very good with nodejs.
This usage problem might be better raised in the context of an Issue for sogeBot, where you might get some assistance by others trying to execute this in an Nginx context. Indeed, there may be other configuration level options...
I don't know if your suggesting that you aren't comfortable trying to make changes in the JS code for sogeBot you're trying to execute? That is, it likely would not be hard to add the agent: false option in the dashboard serving code (if not present)... but that might not address the ENOBUFS issue elsewhere...
Closing as answered, please re-open if anything is outstanding in this.