On Fri, Sep 02, 2022 at 09:53:54AM +0200, Sebastian Benoit wrote:
> Mikolaj Kucharski([email protected]) on 2022.09.02 06:47:00 +0000:
> > Hi,
> > 
> > I have a question, could or should unbound in base be delivered with:
> > 
> > # cat /etc/login.conf.d/unbound
> > unbound:\
> >         :openfiles-cur=4096:\
> >         :openfiles-max=8192:\
> >         :tc=daemon:
> > 
> > or the like? Above is taken from dovecot. I was able to trigger via
> > rcctl reload unbound following warnings in logs:
> > 
> > Sep  2 06:37:21 x1c unbound: [32940:0] notice: Restart of unbound 1.16.0.
> > Sep  2 06:37:21 x1c unbound: [32940:0] warning: setrlimit: Operation not 
> > permitted
> > Sep  2 06:37:21 x1c unbound: [32940:0] warning: cannot increase max open 
> > fds from 512 to 4152
> > Sep  2 06:37:21 x1c unbound: [32940:0] warning: continuing with less udp 
> > ports: 460
> > Sep  2 06:37:21 x1c unbound: [32940:0] warning: increase ulimit or decrease 
> > threads, ports in config to remove this warning
> > Sep  2 06:37:21 x1c unbound: [32940:0] notice: init module 0: validator
> > Sep  2 06:37:21 x1c unbound: [32940:0] notice: init module 1: iterator
> > 
> > After placing above login.conf.d login class capability file above
> > warnings go away:
> > 
> > Sep  2 06:39:58 x1c unbound: [14264:0] notice: Restart of unbound 1.16.0.
> > Sep  2 06:39:58 x1c unbound: [14264:0] notice: init module 0: validator
> > Sep  2 06:39:58 x1c unbound: [14264:0] notice: init module 1: iterator
> 
> As far as i understand, the number of fds that unbound is asking for is
> based on the num-threads, outgoing-num-tcp, interface and some other setting
> in the unbound config.

Those particular settings mentioned I did not modified. However the
values are not that important. I expected /etc/login.conf.d/unbound to
be present on a fresh install. More on that below.


> Did you change any?
> 
> We already ship with this
> 
>       unbound:\
>               :openfiles=512:\
>               :tc=daemon:

Ah, in the main file. I didn't expect this. I started this email thread
as I expected daemon which has rc.d script to have separated login class
capability file:

# ls -1A /etc/login.conf.d/ | wc -l
       0

# tar -zvvtf /var/sysmerge/etc.tgz  | grep -c login.conf.d
0

> It is expected that you change login.conf yourself when you tune unbound to
> your needs.

Yes, I'm aware. That's what I did, but were surprised that there is no
pre-existing /etc/login.conf.d/unbound

However now looking again at this, maybe missing /etc/login.conf.d/
from base is by design.

-- 
Regards,
 Mikolaj

Reply via email to