Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the number of workers in the API service #305

Merged

Conversation

ian-noaa
Copy link
Collaborator

@ian-noaa ian-noaa commented Apr 20, 2023

Gunicorn recommends using 2-4*num_cores workers. Starting conservatively with 4 workers. Unfortunately Docker's CMD directive won't expand environment variables when used with JSON syntax. We could use the CMD directive in shell mode in order to expand the env variable. However, that has its own issues with PID reaping which is something Gunicorn handles when it's called with JSON syntax and given PID 1.

Gunicorn recommends using 2-4*num_cores workers. Starting conservatively
with 4 workers. Unfortunately Docker's `CMD` directive won't expand
environment variables. We could use the `CMD` directive in shell mode
in order to expand the env variable. However, that has its own issues
with PID reaping which is something Gunicorn handles when it's PID 1.
@ian-noaa ian-noaa self-assigned this Apr 20, 2023
@ian-noaa ian-noaa linked an issue Apr 20, 2023 that may be closed by this pull request
@github-actions
Copy link

Code Coverage

Package Line Rate Health
src.unified_graphics 87%
tests 88%
Summary 88% (584 / 665)

Minimum allowed line rate is 60%

@ian-noaa ian-noaa temporarily deployed to vlab April 20, 2023 20:47 — with GitHub Actions Inactive
@ian-noaa ian-noaa temporarily deployed to vlab April 20, 2023 20:49 — with GitHub Actions Inactive
@ian-noaa ian-noaa marked this pull request as ready for review April 24, 2023 16:51
@ian-noaa ian-noaa merged commit 576d5b1 into main Apr 24, 2023
@ian-noaa ian-noaa deleted the 304-increase-the-number-of-workers-in-the-api-service branch April 24, 2023 17:40
@ian-noaa ian-noaa temporarily deployed to vlab April 24, 2023 17:40 — with GitHub Actions Inactive
@ian-noaa ian-noaa temporarily deployed to vlab April 24, 2023 17:40 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase the number of workers in the API service
2 participants