Slr sometimes crashes in our dev setup leaving write.lock
files around which causes problems during next start.
The below removes the lock files prior to start.
Patch in a "Remove-Item" command somewhere in the Start.ps1
# escape=`
ARG PARENT_IMAGE
FROM ${PARENT_IMAGE}
RUN $start=(Get-Content c:\Start.ps1); `
$start -Replace '\$dataPathToTest = ', `
'Remove-Item -Path $DataPath -Include write.lock -Recurse -ErrorAction SilentlyContinue; $dataPathToTest = ' `
| Set-Content c:\Start.ps1
The new solr from Sitecore 10.1 caused us some other headaches around memory management.
We either have to enable "Lock Large Memeory" inside the container, but seems to be kind of tricky using secedit.exe
so the below GC_TUNE simply removes the "UseLargeMemory" options.
solr:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xc0-solr:${RELEASE_VERSION:-latest}
environment:
SOLR_JAVA_MEM: "-Xms1000m -Xmx1000m"
GC_TUNE: -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+AlwaysPreTouch
mem_limit: 1500MB