Cockroach: server: setrlimit on darwin

Created on 25 Jun 2019  路  3Comments  路  Source: cockroachdb/cockroach

37705 adjusted the behavior of the os x handling of setrlimit, but it was incomplete. From a discussion in the release channel that resulted in the following workaround in bincheck: https://github.com/cockroachdb/bincheck/pull/107.

ok, so that means pr 37705 was incomplete. i think it's trying to set the limit too high, it fails once, then it falls back to the default. it should probably make two attempts: set it to the recommended level, and if that fails and we're still below the minimum, try one more time to set it to the minimum

After we address this, the bincheck workaround should be reverted.

A-kv

Most helpful comment

@benesch i just reached the same conclusion and have a PR almost ready

All 3 comments

also assigned @bobvawter in case you should be routing this instead of ben

Urgh. Seems like we should be taking the minimum of kern.maxfilesperproc, kern.maxfiles, and ulimit -n.

@benesch i just reached the same conclusion and have a PR almost ready

Was this page helpful?
0 / 5 - 0 ratings