Re: error: Open connections exceed FD_SETSIZE limit (1024 >= 1024)

"'Nick Anderson' via help-cfengine" <[email protected]> Wed, 12 Nov 2025 10:52:18 -0800 (PST)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
------=_Part_19356_2009159917.1762973538899
Content-Type: multipart/alternative; 
	boundary="----=_Part_19357_1390963821.1762973538899"

------=_Part_19357_1390963821.1762973538899
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


Docs added in=20
master https://docs.cfengine.com/docs/master/reference/masterfiles-policy-f=
ramework/#configure-maxconnections-for-cf-agent

On Wednesday, November 12, 2025 at 11:40:42=E2=80=AFAM UTC-6 Nick Anderson =
wrote:

> Hey Markus,=20
>
> The first thing that jumped out at me from above was how you call your=20
> bundle to copy the file:=20
>
> methods:
>   "any" usebundle =3D> filecollector("$(cf_clients)"),
>      action =3D> silent_sometimes;
>
> You reference the list of clients with $. So, the bundle will be actuated=
=20
> once for each client. Have you instead tried passing the list so that the=
=20
> bundle is called just once and the iteration on the client happens inside=
=20
> the bundle?=20
>
> Like:=20
>
> methods:
>   "any" usebundle =3D> filecollector("@(cf_clients)"),
>      action =3D> silent_sometimes;
>
> Regarding the maximum number of connections, I see that you mention=20
> setting control_server_maxconnections, note that variable is used by body=
=20
> server control (cf-serverd). For your policy, where you have one agent th=
at=20
> is creating a bunch of connections from cf-agent you might consider setti=
ng=20
> default:def.control_agent_maxconnections. It's set to 30 in the MPF by=20
> default.=20
>
> I would link you to the docs that mention it, but it doesn't seem to be=
=20
> explicitly called out yet so I just filed an issue about it here=20
> https://northerntech.atlassian.net/browse/CFE-4602=20
>

--=20
You received this message because you are subscribed to the Google Groups "=
help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengi=
ne/7f2f2067-07e0-4d0b-9a07-02265c482cc6n%40googlegroups.com.

------=_Part_19357_1390963821.1762973538899
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<br />Docs added in master=C2=A0https://docs.cfengine.com/docs/master/refer=
ence/masterfiles-policy-framework/#configure-maxconnections-for-cf-agent<di=
v><br /></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_a=
ttr">On Wednesday, November 12, 2025 at 11:40:42=E2=80=AFAM UTC-6 Nick Ande=
rson wrote:<br/></div><blockquote class=3D"gmail_quote" style=3D"margin: 0 =
0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><=
p>
Hey Markus,
</p>

<p>
The first thing that jumped out at me from above was how you call your bund=
le to copy the file:
</p>

<div>
<pre><span style=3D"color:#a89984;font-weight:bold">methods</span>:
  <span style=3D"color:#689d6a">&quot;any&quot;</span> usebundle =3D&gt; fi=
lecollector<span style=3D"color:#689d6a">(</span><span style=3D"color:#689d=
6a">&quot;$(cf_clients)&quot;</span><span style=3D"color:#689d6a">)</span>,
     action =3D&gt; silent_sometimes;
</pre>
</div>
<p>
You reference the list of clients with <code>$</code>. So, the bundle will =
be actuated once for each client. Have you instead tried passing the list s=
o that the bundle is called just once and the iteration on the client happe=
ns inside the bundle?
</p>

<p>
Like:
</p>

<div>
<pre><span style=3D"color:#a89984;font-weight:bold">methods</span>:
  <span style=3D"color:#689d6a">&quot;any&quot;</span> usebundle =3D&gt; fi=
lecollector<span style=3D"color:#689d6a">(</span><span style=3D"color:#689d=
6a">&quot;@(cf_clients)&quot;</span><span style=3D"color:#689d6a">)</span>,
     action =3D&gt; silent_sometimes;
</pre>
</div>

<p>
Regarding the maximum number of connections, I see that you mention setting=
 <code>control_server_maxconnections</code>, note that variable is used by =
body server control (cf-serverd). For your policy, where you have one agent=
 that is creating a bunch of connections from cf-agent you might consider s=
etting <code>default:def.control_agent_maxconnections</code>. It&#39;s set =
to 30 in the MPF by default.
</p>

<p>
I would link you to the docs that mention it, but it doesn&#39;t seem to be=
 explicitly called out yet so I just filed an issue about it here <a href=
=3D"https://northerntech.atlassian.net/browse/CFE-4602" target=3D"_blank" r=
el=3D"nofollow" data-saferedirecturl=3D"https://www.google.com/url?hl=3Den&=
amp;q=3Dhttps://northerntech.atlassian.net/browse/CFE-4602&amp;source=3Dgma=
il&amp;ust=3D1763058382438000&amp;usg=3DAOvVaw39mjTbUSWJYKaiHm7X1pfi">https=
://northerntech.atlassian.net/browse/CFE-4602</a>
</p>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;help-cfengine&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">help-=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
help-cfengine/7f2f2067-07e0-4d0b-9a07-02265c482cc6n%40googlegroups.com?utm_=
medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/help-=
cfengine/7f2f2067-07e0-4d0b-9a07-02265c482cc6n%40googlegroups.com</a>.<br /=
>

------=_Part_19357_1390963821.1762973538899--

------=_Part_19356_2009159917.1762973538899--