Hi, I'm trying to query elasticsearch from node.js and from quite regularly I get error
I query by scroll id. The queries goes one after other, quite quickly, one query takes maybe 10-30ms to resolve at server side. For querying I use request module and the requests should go in series (nothing parallel).
When I look at the requests through Fiddler, there is nothing interesting.
So I ran Process Monitor and Process Explorer.
Process Explorer shows me that there is about 20-30 tcp connections, most of them are in fin_wait2 state. After some time they are probably closed (as they disappear).
Process Monitor shows me that when the process exists, there is a lot of requests that are disconnected. Last time that was 38 disconnected connections. I exit the process when I get ECONNRESET. In other words - if the process gets ECONNRESET, there are connections that are not disconnected.
Does the connections close ElasticSearch because there are some limits for open connections? No idea.
Anyway, I'd like to avoid ECONNERESET at all. Any ideas, please?