Lines Matching refs:max_fds

406 		if (srv->srvconf.max_conns > srv->max_fds/2) {  in set_max_conns()
410 srv->srvconf.max_conns, srv->max_fds); in set_max_conns()
411 srv->max_conns = srv->max_fds/2; in set_max_conns()
417 srv->max_conns = srv->max_fds/3; in set_max_conns()
430 if (NULL == (srv->ev = fdevent_init(srv, srv->max_fds + 1, srv->event_handler))) { in initialize_fd_framework()
599 ((*srv_states)[i])->max_fds = first_entry->max_fds; in init_server_states()
639 srv->max_fds = srv->max_conns * 3; in start_server()
852 if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */ in start_server()
865 if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */ in start_server()
928 int free_fds = srv->max_fds - srv->cur_fds - 16; in start_server()
1432 srv->max_fds = FD_SETSIZE - 200; in main()
1434 srv->max_fds = 4096; in main()
1452 if (use_rlimit && srv->srvconf.max_fds) { in main()
1455 rlim.rlim_cur = srv->srvconf.max_fds; in main()
1456 rlim.rlim_max = srv->srvconf.max_fds; in main()
1467 srv->max_fds = rlim.rlim_cur < ((int)FD_SETSIZE) - 200 ? rlim.rlim_cur : FD_SETSIZE - 200; in main()
1469 srv->max_fds = rlim.rlim_cur; in main()
1480 if (srv->max_fds > ((int)FD_SETSIZE) - 200) { in main()
1531 if (srv->srvconf.max_fds && srv->srvconf.max_fds < (int)rlim.rlim_cur) { in main()
1534 rlim.rlim_cur = srv->srvconf.max_fds; in main()
1545 srv->max_fds = rlim.rlim_cur < ((int)FD_SETSIZE) - 200 ? rlim.rlim_cur : FD_SETSIZE - 200; in main()
1547 srv->max_fds = rlim.rlim_cur; in main()
1559 if (srv->max_fds > ((int)FD_SETSIZE) - 200) { in main()
2088 if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */ in main()
2101 if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */ in main()
2160 int free_fds = srv->max_fds - srv->cur_fds - 16; in main()