-
Notifications
You must be signed in to change notification settings - Fork 727
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
set http.agent to false #327
Comments
Okay, so I read through the linked issue and found this from nodejs/node-v0.x-archive#4769 (the source issue).
and
I'm not sure how this is supposed to solve the issue you are experiencing; you will still run out of file descriptors eventually by setting |
Setting So this is not a theoretical problem with a theoretical solution, but a really existing problem with a approved solution. The nodejs guys say the same, but unfortunately they have not fixed the problem corretcly after two years. |
Can you link to a comment where someone says that |
So here you are right. From that perspective it probably does not solve the problem, but at least solves the symptom. So the question is, if you will allow the API-user to decide, wether to set the agent to |
Your Solr equivalent did that. |
I originally planned to refer you to this gist which I have pointed to several times in the past when users wanted to modify the node.js agent. Rather than just doing that though, I submitted #329 which will allow you full control over the Agent that each http(s) backed connection will use. In order to accomplish your goal you would simply do: var client = new elasticsearch.Client({
createNodeAgent() {
return false
}
}) Would you mind giving the PR a look and seeing if it works for you? |
Works perfectly! |
Due to this issue it is necessary to have the possibility to set the http.agent to
false
. While doing a bulk insert into elastic I getno living connections available
akaEADDRNOTAVAIL
.The text was updated successfully, but these errors were encountered: