launchd process/fork limit

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

launchd process/fork limit

Postby jonios » Sun Feb 24, 2019 3:51 am

tldr: what is the cause of
Code: Select all
Feb 23 07:58:31 mac com.apple.xpc.launchd[1] (com.openssh.sshd): Could not create new instance of inetd service: 67: Too many processes


My mac box is configured in such a way that I cannot create any additional ssh sessions. I have like 40 ssh sessions already to it and an additional ssh command produces this behavior on the client:

Code: Select all
$ ssh mac
mux_client_request_session: session request failed: Session open refused by peer
ssh_exchange_identification: Connection closed by remote host


When the ssh attempt fails, on the server I see this in 'log stream'
Code: Select all
$ log stream
2019-02-23 19:20:24.539062-0800 0x2c5165   Default     0x0                  69588  0    sshd: error: no more sessions

And this in /var/log/system.log
Code: Select all
Feb 23 07:58:31 ops-us-push-0 com.apple.xpc.launchd[1] (com.openssh.sshd): Could not create new instance of inetd service: 67: Too many processes


I am pretty sure its not a 'maxsessions' issue with sshd itself as I set the limit much higher than the current number of sessions.
Code: Select all
$ sudo sshd -T | grep maxsessions
maxsessions 1000


Also I think its unrelated to 'launchctl limit maxproc', as that is also reasonably high:
Code: Select all
$ sudo launchctl limit
maxproc     1064           1064


Is there some other configuration change I can make to launchd to overcome this limit?
jonios
 
Posts: 7
Joined: Tue May 01, 2018 10:11 pm

Re: launchd process/fork limit

Postby acura » Sun Feb 24, 2019 9:48 pm

Seems like an sshd config issue when I search the error message. But maybe you have already tried those solutions?
acura
 
Posts: 20
Joined: Thu Feb 15, 2018 9:16 pm

Re: launchd process/fork limit

Postby jonios » Mon Feb 25, 2019 6:01 am

Yea I fiddled with the sshd_config a bit and it seems the issue has gone away. I'm not sure exactly what combination of options it was that worked, but also I think restarting/reloading the openssh daemon helped too. Anyway, not an issue with launchd.
jonios
 
Posts: 7
Joined: Tue May 01, 2018 10:11 pm


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 4 guests