Thank you very much, Otto! Almost one day of test after configuring _unbound class, and no more "Too many open files".
Once more, thank you for your time, and happy new year. Raimundo Santos On 30 December 2014 at 11:14, Otto Moerbeek <o...@drijf.net> wrote: > On Tue, Dec 30, 2014 at 11:09:44AM -0200, Raimundo Santos wrote: > > > Hello misc@! > > > > I have a router (peaking at 70Mbps of aggregated traffic) that acts as a > > recursive internal DNS server too (this configuration will die > > soon, as my traffic is growing), but Unbound keep saying, in > > /var/log/messages: > > > > Dec 30 09:57:07 myhost unbound: [3873:0] error: can't create socket: Too > > many open files > > Dec 30 09:57:08 myhost last message repeated 20284 times > > Dec 30 10:26:48 myhost unbound: [3873:0] error: can't create socket: Too > > many open files > > Dec 30 10:26:50 myhost last message repeated 24896 times > > > > Sometimes it says: > > > > Dec 27 21:49:19 myhost unbound: [2565:0] notice: sendto failed: No buffer > > space available > > > > I have: > > > > kern.maxfiles=16384 > > kern.somaxconn=16384 > > > > And in login.conf: > > > > daemon:\ > > :ignorenologin:\ > > :datasize=infinity:\ > > :maxproc=infinity:\ > > :openfiles-cur=4096:\ > > :openfiles-max=8192:\ > > :stacksize-cur=8M:\ > > :localcipher=blowfish,9:\ > > :tc=default: > > > > unbound:\ > > :ignorenologin:\ > > :datasize=infinity:\ > > :maxproc=infinity:\ > > :openfiles-cur=8192:\ > > :openfiles-max=16384:\ > > :stacksize-cur=32M:\ > > :localcipher=blowfish,9:\ > > :tc=default: > > > > With many resources just for Unbound, how can it keep complaining? > > There's an undocumented "feature" with unbound: it (only) sets its > resource limits based on the class of its user (_unbound by default). > > So set the class of the _unbound user to unbound and you're all set. > > -Otto > > > > > Thandk you in advance, and happy new year! > > Raimundo Santos > > > > -- > > > > Here are some more info... > > > > # systat -B mbufs > > > > > > 1 users Load 0.16 0.12 0.09 Tue Dec 30 > 11:02:00 > > 2014 > > > > IFACE LIVELOCKS SIZE ALIVE LWM HWM CWM > > > > System 0 256 194 93 > > > > 2048 184 442 > > > > lo0 > > > > em0 2048 90 10 256 90 > > > > xl0 > > > > re0 > > > > re1 > > > > enc0 > > > > pflog0 > > > > > > ...and the dmesg: > > > > OpenBSD 5.6 (GENERIC) #310: Fri Aug 8 00:14:24 MDT 2014 > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC > > real mem = 8502595584 (8108MB) > > avail mem = 8267517952 (7884MB) > > mpath0 at root > > scsibus0 at mpath0: 256 targets > > mainbus0 at root > > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe84b0 (59 entries) > > bios0: vendor Intel Corp. version "NBG4310H.86A.0051.2008.0804.1738" date > > 08/04/2008 > > bios0: Intel Corporation DP43TF > > acpi0 at bios0: rev 2couldn't map rsdt > > , can't load tables > > cpu0 at mainbus0: (uniprocessor) > > cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2394.30 MHz > > cpu0: > > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF > > cpu0: 4MB 64b/line 16-way L2 cache > > cpu0: smt 0, core 0, package 0 > > mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges > > pci0 at mainbus0 bus 0 > > pchb0 at pci0 dev 0 function 0 "Intel G45 Host" rev 0x03 > > ppb0 at pci0 dev 1 function 0 "Intel G45 PCIE" rev 0x03: irq 11 > > pci1 at ppb0 bus 1 > > vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 8600 GT" rev 0xa1 > > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > > wsdisplay0: screen 1-5 added (80x25, vt100 emulation) > > vendor "Intel", unknown product 0x2e24 (class communications subclass > > miscellaneous, rev 0x03) at pci0 dev 3 function 0 not configured > > em0 at pci0 dev 25 function 0 "Intel ICH10 R BM V" rev 0x00: irq 10, > > address 00:1c:c0:91:9f:c3 > > uhci0 at pci0 dev 26 function 0 "Intel 82801JI USB" rev 0x00: irq 11 > > uhci1 at pci0 dev 26 function 1 "Intel 82801JI USB" rev 0x00: irq 5 > > uhci2 at pci0 dev 26 function 2 "Intel 82801JI USB" rev 0x00: irq 3 > > ehci0 at pci0 dev 26 function 7 "Intel 82801JI USB" rev 0x00: irq 3 > > usb0 at ehci0: USB revision 2.0 > > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > > ppb1 at pci0 dev 28 function 0 "Intel 82801JI PCIE" rev 0x00: irq 7 > > pci2 at ppb1 bus 2 > > ppb2 at pci0 dev 28 function 3 "Intel 82801JI PCIE" rev 0x00: irq 4 > > pci3 at ppb2 bus 3 > > jmb0 at pci3 dev 0 function 0 "JMicron JMB368 IDE" rev 0x00 > > pciide0 at jmb0: DMA, channel 0 wired to native-PCI, channel 1 wired to > > native-PCI > > pciide0: using irq 4 for native-PCI interrupt > > pciide0: channel 0 disabled (no drives) > > pciide0: channel 1 disabled (no drives) > > uhci3 at pci0 dev 29 function 0 "Intel 82801JI USB" rev 0x00: irq 11 > > uhci4 at pci0 dev 29 function 1 "Intel 82801JI USB" rev 0x00: irq 4 > > uhci5 at pci0 dev 29 function 2 "Intel 82801JI USB" rev 0x00: irq 3 > > ehci1 at pci0 dev 29 function 7 "Intel 82801JI USB" rev 0x00: irq 11 > > ehci1: timed out waiting for BIOS > > usb1 at ehci1: USB revision 2.0 > > uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > > ppb3 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x90 > > pci4 at ppb3 bus 4 > > xl0 at pci4 dev 0 function 0 "3Com 3c905C 100Base-TX" rev 0x74: irq 10, > > address 00:50:da:0d:d8:b9 > > bmtphy0 at xl0 phy 24: 3C905C internal PHY, rev. 6 > > re0 at pci4 dev 2 function 0 "Realtek 8169" rev 0x10: RTL8169/8110SB > > (0x1000), irq 5, address 00:0c:76:86:02:37 > > rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3 > > re1 at pci4 dev 4 function 0 "Realtek 8169" rev 0x10: RTL8169/8110SB > > (0x1000), irq 10, address 00:0c:76:87:03:23 > > rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 3 > > pcib0 at pci0 dev 31 function 0 "Intel 82801JIB LPC" rev 0x00 > > ahci0 at pci0 dev 31 function 2 "Intel 82801JI AHCI" rev 0x00: irq 4, > AHCI > > 1.2 > > scsibus1 at ahci0: 32 targets > > sd0 at scsibus1 targ 0 lun 0: <ATA, ST1000DM003-1CH1, CC47> SCSI3 > 0/direct > > fixed naa.5000c5006585bf25 > > sd0: 953869MB, 512 bytes/sector, 1953525168 sectors > > ichiic0 at pci0 dev 31 function 3 "Intel 82801JI SMBus" rev 0x00: irq 3 > > iic0 at ichiic0 > > spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 > > spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL5 > > spdmem2 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 > > spdmem3 at iic0 addr 0x53: 2GB DDR2 SDRAM non-parity PC2-6400CL5 > > usb2 at uhci0: USB revision 1.0 > > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > usb3 at uhci1: USB revision 1.0 > > uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > usb4 at uhci2: USB revision 1.0 > > uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > usb5 at uhci3: USB revision 1.0 > > uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > usb6 at uhci4: USB revision 1.0 > > uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > usb7 at uhci5: USB revision 1.0 > > uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > > isa0 at pcib0 > > isadma0 at isa0 > > pckbc0 at isa0 port 0x60/5 > > pckbd0 at pckbc0 (kbd slot) > > pckbc0: using irq 1 for kbd slot > > wskbd0 at pckbd0: console keyboard, using wsdisplay0 > > pcppi0 at isa0 port 0x61 > > spkr0 at pcppi0 > > wbsio0 at isa0 port 0x2e/2: W83627DHG rev 0x23 > > wbsio0 port 0x290/2 not configured > > vscsi0 at root > > scsibus2 at vscsi0: 256 targets > > softraid0 at root > > scsibus3 at softraid0: 256 targets > > root on sd0a (ea2168ac5c1b2375.a) swap on sd0b dump on sd0b