2

I'm running into an issue where I need more than 256 open ssh connections for a deployment pipeline. This process stalls when ssh-agent runs into the file limit. I've raised the limit via

launchctl limit maxfiles 4096 unlimited

restarted ssh-agent and raised the limit in the current shell however the agent appears to retain a 256 file limit. What would the appropriate way to raise the limit on a permanent basis be?

  • 2
  • That does not; besides being 12 years old, the kern.maxfiles is already larger than the values there and the commands I ran would cover the other two cases in the first answer.

    I can raise my local shell's ulimit and run eval `ssh-agent` then things are fine. That indicates the problem is related to launchd not picking up the limits from launchctl limit when starting a process. I could just continue to do this but I'd rather not have to start a separate agent when I need the higher limit or manage which shells are using which agent.

    – Michael Conlen Feb 23 '24 at 23:08
  • So you created sysctl.conf and launchd.conf with the proper directives, then rebooted, and there was no change? – Linc D. Feb 24 '24 at 06:50

0 Answers0