Skip to content

Conversation

@jimklimov
Copy link
Member

@jimklimov jimklimov commented Feb 6, 2026

Closes: #3302

Should help on systems where the POSIX _SC_OPEN_MAX is configured to a lower value than a large monitoring deployment needs, and on Windows where MAXIMUM_WAIT_OBJECTS is hardcoded to just 64.

Earlier such systems either failed to handle all needed file descriptors, or refused to start when MAXCONN was increased accordingly (and beyond what the OS allows to poll in one operation). Now they should try to poll in smaller chunks with smaller timeouts, ultimately behaving similarly. There should be no change when nfds (amount of connections of interest to a loop cycle) is small enough to fit into one poll() or WaitForMultipleObjects() run.

CC @aarnold-sd68 : testing welcome, your Windows setup with its severely constrained sysmaxconn and lots of UPSes should provide a reasonable testbed. I am particularly interested to know if I got the integer division and zero/nonzero remainder maths right (should be testable with MAXCONN setting and perhaps varying amount of NUT clients to hit multiples of 64 as well as values slightly above/below that).

Hopefully https://ci.appveyor.com/project/nut-travis/nut/builds/53499323 will provide the needed binary archive :)

@jimklimov jimklimov added this to the 2.8.5 milestone Feb 6, 2026
@jimklimov jimklimov added enhancement portability We want NUT to build and run everywhere possible Connection stability issues Issues about driver<->device and/or networked connections (upsd<->upsmon...) going AWOL over time labels Feb 6, 2026
@jimklimov jimklimov force-pushed the issue-3302 branch 2 times, most recently from bda4065 to d2b22f5 Compare February 6, 2026 14:45
@AppVeyorBot
Copy link

…oc: track "sysmaxconn" not as a reason to fail data server configuration, but to chunk the MAXCONN-sized array processing into several smaller polls as needed [networkupstools#3302]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…s#3302]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… (equality should be ok) [networkupstools#3302]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

… NUT_SYSMAXCONN_LIMIT envvar to tweak [networkupstools#3302]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

@jimklimov jimklimov merged commit 3c77d91 into networkupstools:master Feb 10, 2026
22 of 23 checks passed
@jimklimov jimklimov deleted the issue-3302 branch February 10, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Connection stability issues Issues about driver<->device and/or networked connections (upsd<->upsmon...) going AWOL over time enhancement portability We want NUT to build and run everywhere possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pushing Nut on Windows....

2 participants