I'm working on a Wikibase containing floristic data where updates can be very large. The default batch size of 100 leads to Java heap space errors Exception in thread "main" java.lang.OutOfMemoryError: Java heap space for which the recommended approach seems to be to reduce the update batch size.
Unfortunately there's no way to do this in the configuration to the image, so I've worked around it by building the wdqs-updater service from the local Dockerfile rather than the image, and modifying runUpdate.sh to pass the batch size from an environment variable specified in the docker-compose config:
runUpdate.sh
./runUpdate.sh -h http://$WDQS_HOST:$WDQS_PORT -- --wikibaseUrl $WIKIBASE_SCHEME://$WIKIBASE_HOST --conceptUri $WIKIBASE_SCHEME://$WIKIBASE_HOST --entityNamespaces $WDQS_ENTITY_NAMESPACES -b ${WDQS_BATCH_SIZE}docker-compose
wdqs-updater:
build:
context: ./wdqs/0.3.10
restart: unless-stopped
command: /runUpdate.sh
depends_on:
- wdqs
- wikibase
networks:
default:
aliases:
- wdqs-updater.svc
environment:
- WIKIBASE_HOST=wikibase.svc
- WDQS_HOST=wdqs.svc
- WDQS_PORT=9999
- WDQS_BATCH_SIZE=25It'd be great to see this make it into the image. I'd be happy to prepare a small pull request (or whatever the terminology is on Phabricator) if it's a desirable change.