Socket accept - “Too many open files”

后端 未结 13 1934
情歌与酒
情歌与酒 2020-11-28 02:48

I am working on a school project where I had to write a multi-threaded server, and now I am comparing it to apache by running some tests against it. I am using autobench to

13条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 02:56

    On MacOS, show the limits:

    launchctl limit maxfiles
    

    Result like: maxfiles 256 1000

    If the numbers (soft limit & hard limit) are too low, you have to set upper:

    sudo launchctl limit maxfiles 65536 200000
    

提交回复
热议问题