Telegraf - too many open files - error

Hi,

We have telegraf running around 1500 url end points, On top of existing setup I try to configure 1000 more endpoints.

When, I execute the updated telegraf.conf, Following “too many open files” error spotted in telegraf.log

E! [inputs.http] Error in plugin: [url=http://a.b.c.d:31086/app1/health]: Get http://a.b.c.d:31086/app1/health: dial tcp a.b.c.d:31086: socket: too many open files
E! [inputs.http] Error in plugin: [url=http://a.b.c.d:31087/app1/health]: Get http://a.b.c.d:31087/app1/health: dial tcp a.b.c.d:31087: socket: too many open files
E! [inputs.http] Error in plugin: [url=http://a.b.c.d:31088/app1/health]: Get http://a.b.c.d:31088/app1/health: dial tcp a.b.c.d:31088: socket: too many open files
E! [inputs.jolokia2_agent] Error in plugin: Unable to gather metrics for http://p.q.r.s:9321/app2/jolokia: Post http://p.q.r.s:9321/app2/jolokia/read: dial tcp p.q.r.s:9321: socket: too many open files
E! [inputs.jolokia2_agent] Error in plugin: Unable to gather metrics for http://p.q.r.s:13187/app3/jolokia: Post http://p.q.r.s:13187/app3/jolokia/read: dial tcp p.q.r.s:13187: socket: too many open files
E! [inputs.jolokia2_agent] Error in plugin: Unable to gather metrics for http://p.q.r.s:13075/app4/jolokia: Post http://p.q.r.s:13075/app4/jolokia/read: dial tcp p.q.r.s:13075: socket: too many open files

also in my telegraf/script/init.sh file noticed this variable.
OPEN_FILE_LIMIT=65536

Could you please help to resolve this issue.

Hello @parthiuk,
Welcome!
I think this post is relevant to you:

1 Like