Skip to content

Commit 02e91ad

Browse files
committed
max file descriptors for pgrst/nginx
1 parent 37794e2 commit 02e91ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nixops.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let
66
durationSeconds = (import ./global.nix).durationSeconds;
77
region = "us-east-2";
88
accessKeyId = builtins.getEnv "PGRSTBENCH_AWS_PROFILE";
9+
maxFileDescriptors = 500000;
910
env = {
1011
withNginx = builtins.getEnv "PGRSTBENCH_WITH_NGINX" == "true";
1112
withUnixSocket = builtins.getEnv "PGRSTBENCH_WITH_UNIX_SOCKET" == "true";
@@ -168,6 +169,7 @@ in {
168169
serviceConfig = {
169170
ExecStart = "${postgrest}/bin/postgrest ${pgrstConf}";
170171
Restart = "always";
172+
LimitNOFILE = maxFileDescriptors;
171173
};
172174
};
173175
nginx =
@@ -246,6 +248,7 @@ in {
246248
UMask = "0027"; # 0640 / 0750
247249
# Security
248250
NoNewPrivileges = true;
251+
LimitNOFILE = maxFileDescriptors;
249252
};
250253
};
251254
};

0 commit comments

Comments
 (0)