This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs/nginx: raise worker connections and fd limit for websocket load

+16
+16
2configs/nginx.nix
··· 14 14 15 15 enableReload = true; 16 16 17 + # nginx defaults to one worker with 512 connections, and a proxied 18 + # websocket costs two of them (client + upstream). maze.lassul.us hit 19 + # "512 worker_connections are not enough" at ~250 players, which takes 20 + # down every other vhost on the box with it. 21 + eventsConfig = '' 22 + worker_connections 8192; 23 + multi_accept on; 24 + ''; 25 + appendConfig = '' 26 + worker_processes auto; 27 + worker_rlimit_nofile 65536; 28 + ''; 29 + 17 30 # avoid nixpkgs nginx's /tmp/nginx_* compile-time defaults: under 18 31 # systemd PrivateTmp they don't survive a host `rm -rf /tmp/*`. 19 32 appendHttpConfig = '' ··· 36 49 locations."~ ^/.well-known/acme-challenge/".root = "/var/lib/acme/acme-challenge"; 37 50 }; 38 51 }; 52 + 53 + # worker_rlimit_nofile above only matters if systemd lets nginx have them. 54 + systemd.services.nginx.serviceConfig.LimitNOFILE = 65536; 39 55 }