Skip to content

Commit

Permalink
Increase number of file descriptors available to the playground
Browse files Browse the repository at this point in the history
With the WebSocket functionality, we now have a number of latent
connections hanging out.
  • Loading branch information
shepmaster committed Sep 8, 2023
1 parent 505f4f9 commit 8c9ae5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/playbooks/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
5 changes: 5 additions & 0 deletions ansible/roles/playground/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ 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 but `2560` resulted in sporadic errors, so there
# must be many non-WebSocket connections.
vars_playground_number_connections: 5120
2 changes: 2 additions & 0 deletions ansible/roles/playground/templates/playground.service
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ WorkingDirectory={{ vars_playground_artifacts_path }}

ExecStart={{ vars_playground_executable_path }}

LimitNOFILE={{ vars_playground_number_connections }}

[Install]
WantedBy=multi-user.target

0 comments on commit 8c9ae5f

Please sign in to comment.