Skip to content

Commit 2a8e9d1

Browse files
docker: make the queue worker --memory argument configurable (#3123)
1 parent 12c1be1 commit 2a8e9d1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docker/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = "start-website" ] ; then
4343
# If the start-worker argument was provided, start a worker process instead
4444
elif [ "$1" = "start-worker" ] ; then
4545
php artisan storage:mkdirs
46-
php -d memory_limit=-1 artisan queue:work --max-time=3600
46+
php -d memory_limit=-1 artisan queue:work --max-time=3600 --memory=${WORKER_MEMORY_LIMIT:-256}
4747

4848
# Otherwise, throw an error...
4949
else

docs/docker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ To set up a CDash production instance using docker compose, follow these steps:
7070
- `SSL_CERTIFICATE_FILE=</path/to/certs/cdash.pem>`
7171
- `SSL_CERTIFICATE_KEY_FILE=</path/to/certs/cdash.key>`
7272
- `NUM_WORKERS=<desired number of queue worker replicas, defaults to 1>`
73+
- `WORKER_MEMORY_LIMIT`: restart worker after parsing a job if it consumed more than this amount of memory (in MB). Default: 256.
7374
* For postgres only, edit `docker/docker-compose.postgres.yml` and uncomment the `worker` section.
7475
* Run this command to start your CDash containers:
7576
```bash

0 commit comments

Comments
 (0)