diff --git a/ansible/playbooks/playground.yml b/ansible/playbooks/playground.yml index cc2aba862..0b3792761 100644 --- a/ansible/playbooks/playground.yml +++ b/ansible/playbooks/playground.yml @@ -20,6 +20,7 @@ - "{{ vars_playground_domain }}" - role: nginx + worker_connections: "{{ vars_playground_number_connections }}" proxied: - domain: "{{ vars_playground_domain }}" to: "http://127.0.0.1:{{ vars_playground_env_ui_port }}" diff --git a/ansible/roles/playground/defaults/main.yml b/ansible/roles/playground/defaults/main.yml index b478e6fa7..b1dbc6300 100644 --- a/ansible/roles/playground/defaults/main.yml +++ b/ansible/roles/playground/defaults/main.yml @@ -19,3 +19,7 @@ vars_playground_env_cors_enabled: 1 vars_playground_env_ui_address: 127.0.0.1 vars_playground_env_ui_port: 8080 vars_playground_env_ui_root_path: "{{ vars_playground_artifacts_path }}/build" + +# The playground peaks at a bit less than 2000 open file descriptors +# over a normal week, so give ourselves a little bit of a buffer. +vars_playground_number_connections: 2560 diff --git a/ansible/roles/playground/templates/playground.service b/ansible/roles/playground/templates/playground.service index c0bc5638d..7b9477bb4 100644 --- a/ansible/roles/playground/templates/playground.service +++ b/ansible/roles/playground/templates/playground.service @@ -19,5 +19,7 @@ WorkingDirectory={{ vars_playground_artifacts_path }} ExecStart={{ vars_playground_executable_path }} +LimitNOFILE={{ vars_playground_number_connections }} + [Install] WantedBy=multi-user.target