mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-17 18:32:35 +00:00
⭐ Proposed for 1.10.1 - "Baserows backend workers default to only one process instead of the num available cores"
This commit is contained in:
parent
6a28a0d1b0
commit
37b9d52007
3 changed files with 10 additions and 3 deletions
|
@ -29,7 +29,7 @@ BASEROW_BACKEND_BIND_ADDRESS=${BASEROW_BACKEND_BIND_ADDRESS:-0.0.0.0}
|
|||
BASEROW_BACKEND_LOG_LEVEL=${BASEROW_BACKEND_LOG_LEVEL:-INFO}
|
||||
BASEROW_ENABLE_SECURE_PROXY_SSL_HEADER=${BASEROW_ENABLE_SECURE_PROXY_SSL_HEADER:-}
|
||||
|
||||
BASEROW_AMOUNT_OF_WORKERS=${BASEROW_AMOUNT_OF_WORKERS:-1}
|
||||
BASEROW_AMOUNT_OF_WORKERS=${BASEROW_AMOUNT_OF_WORKERS:-}
|
||||
BASEROW_AMOUNT_OF_GUNICORN_WORKERS=${BASEROW_AMOUNT_OF_GUNICORN_WORKERS:-3}
|
||||
|
||||
# Celery related variables
|
||||
|
@ -160,7 +160,10 @@ start_celery_worker(){
|
|||
else
|
||||
EXTRA_CELERY_ARGS=()
|
||||
fi
|
||||
exec celery -A baserow worker --concurrency "$BASEROW_AMOUNT_OF_WORKERS" "${EXTRA_CELERY_ARGS[@]}" -l INFO "$@"
|
||||
if [[ -n "$BASEROW_AMOUNT_OF_WORKERS" ]]; then
|
||||
EXTRA_CELERY_ARGS+=(--concurrency "$BASEROW_AMOUNT_OF_WORKERS")
|
||||
fi
|
||||
exec celery -A baserow worker "${EXTRA_CELERY_ARGS[@]}" -l INFO "$@"
|
||||
}
|
||||
|
||||
# Lets devs attach to this container running the passed command, press ctrl-c and only
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
* Fixed bad request displayed with webhook endpoints that redirects
|
||||
* **breaking change** The API endpoint `/api/templates/install/<group_id>/<template_id>/`
|
||||
is now a POST request instead of GET.
|
||||
* The standalone `baserow/backend` image when used to run a celery service now defaults
|
||||
to running celery with the same number of processes as the number of available cores.
|
||||
* When the BASEROW_AMOUNT_OF_WORKERS env variable is set to blank, the amount of worker
|
||||
processes defaults to the number of available cores.
|
||||
|
||||
## Released (2022-10-05 1.10.0)
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ The installation methods referred to in the variable descriptions are:
|
|||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| BASEROW\_CELERY\_BEAT\_STARTUP\_DELAY | The number of seconds the celery beat worker sleeps before starting up. | 15 |
|
||||
| BASEROW\_CELERY\_BEAT\_DEBUG\_LEVEL | The logging level for the celery beat service. | INFO |
|
||||
| BASEROW\_AMOUNT\_OF\_WORKERS | The number of concurrent celery worker processes used to process asynchronous tasks. | 1 |
|
||||
| BASEROW\_AMOUNT\_OF\_WORKERS | The number of concurrent celery worker processes used to process asynchronous tasks. If not set will default to the number of available cores. Each celery process uses memory, to reduce Baserow's memory footprint consider setting and reducing this variable. | 1 for the All-in-one, Heroku and Cloudron images. Defaults to empty and hence the number of available cores in the standalone images. |
|
||||
| BASEROW\_RUN\_MINIMAL | When BASEROW\_AMOUNT\_OF\_WORKERS is 1 and this is set to a non emtpy value Baserow will not run the export-worker but instead run both the celery export and normal tasks on the normal celery worker. Set this to lower the memory usage of Baserow in expense of performance. | |
|
||||
|
||||
### Backend Misc Configuration
|
||||
|
|
Loading…
Add table
Reference in a new issue