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

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

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
APACHE_LOG_DIR=/var/log/apache2

# System setup
RUN set x; \

Check failure on line 17 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 17 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`

Check failure on line 17 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`.Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
apt-get clean \
&& apt-get update \
&& apt-get install -y aptitude \
Expand Down Expand Up @@ -88,7 +88,7 @@
&& mkdir -p $MW_VOLUME

# Composer
RUN set -x; \

Check failure on line 91 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL4001 warning: Either use Wget or Curl but not both
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer self-update 2.1.3

Expand Down Expand Up @@ -177,6 +177,7 @@
# 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
Loading