Repository navigation
Conversation
…erver listens With a container's default 1024 descriptors, idle connections can use up the rest, and the server then waits on every accept. The listener already said so once a burst and backed off; it now also raises the soft RLIMIT_NOFILE to the hard limit when it opens (65536, then 10240, when the hard limit is unlimited), as ashhart#294 (by plotarmordev) did for the Python engine. A failure to raise it leaves the limit as it was.
dc59ebe to
22e3067
Compare
|
Rebased onto 1.0.9 ( |
|
Thank you, @Bizuayeu, and thanks for carrying @plotarmordev's idea from #294 over to the Zig server. The server already does this. Since 1.0.0, Your write-up of the container case, 1,024 descriptors with idle connections starving |
What this changes
With a container's default 1,024 descriptors, idle connections can use up the rest, and the server then waits on
every accept. The listener already said so once a burst and backed off; it now also raises the soft
RLIMIT_NOFILEto the hard limit when it opens (65,536, then 10,240, when the hard limit is unlimited). A failureto raise it leaves the limit as it was. This is #294's idea (by @plotarmordev) for the Zig server.
Receipt
c36b536d) plus this change; one GB10 (DGX Spark, sm_121, CUDA 13.3).zig build test: 294 passed, 5 skipped, 0 failed; the new "the soft open-file limit is raised to the hard one"needs this change.
zig build test-cuda-host: 430 passed, 0 failed.zig fmt --check: clean.lean_check: 538, as main.setrlimit; the test runs on Linux here). The fallback for an unlimited hard limit (65,536, then 10,240) is not tested: a test can't raise its own hard limit to unlimited without privileges, and the test skips on a machine whose hard limit already is.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.