Skip to content

Commit

Permalink
addition of the --memory-limit flag (with a value of 512M) when calli…
Browse files Browse the repository at this point in the history
…ng runJobs.php (#407)

* addition of the --memory-limit flag (with a value of 512M) when calling runJobs.php

* Remove unrelated changes
  • Loading branch information
naresh-kumar-babu authored Jun 24, 2024
1 parent adbbc8a commit 28764de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ COPY --from=source $MW_ORIGIN_FILES $MW_ORIGIN_FILES
# Default values
ENV MW_ENABLE_JOB_RUNNER=true \
MW_JOB_RUNNER_PAUSE=2 \
MW_JOB_RUNNER_MEMORY_LIMIT=512M \
MW_ENABLE_TRANSCODER=true \
MW_JOB_TRANSCODER_PAUSE=60 \
MW_MAP_DOMAIN_TO_DOCKER_GATEWAY=true \
Expand Down
8 changes: 4 additions & 4 deletions _sources/scripts/maintenance-scripts/mw_job_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ if [ -f "$MW_VOLUME/config/wikis.yaml" ]; then
while true; do
# Job types that need to be run ASAP no matter how many of them are in the queue
# Those jobs should be very "cheap" to run
php $RJ --type="enotifNotify" --server="https://$wiki_url" --wiki="$wiki_id"
php $RJ --memory-limit="$MW_JOB_RUNNER_MEMORY_LIMIT" --type="enotifNotify" --server="https://$wiki_url" --wiki="$wiki_id"
sleep 1
php $RJ --type="createPage" --server="https://$wiki_url" --wiki="$wiki_id"
php $RJ --memory-limit="$MW_JOB_RUNNER_MEMORY_LIMIT" --type="createPage" --server="https://$wiki_url" --wiki="$wiki_id"
sleep 1
php $RJ --type="refreshLinks" --server="https://$wiki_url" --wiki="$wiki_id"
php $RJ --memory-limit="$MW_JOB_RUNNER_MEMORY_LIMIT" --type="refreshLinks" --server="https://$wiki_url" --wiki="$wiki_id"
sleep 1
php $RJ --type="htmlCacheUpdate" --maxjobs=500 --server="https://$wiki_url" --wiki="$wiki_id"
php $RJ --memory-limit="$MW_JOB_RUNNER_MEMORY_LIMIT" --type="htmlCacheUpdate" --maxjobs=500 --server="https://$wiki_url" --wiki="$wiki_id"
sleep 1
# Everything else, limit the number of jobs on each batch
# The --wait parameter will pause the execution here until new jobs are added,
Expand Down

0 comments on commit 28764de

Please sign in to comment.