If you are following one of these blog posts on setting up Solr in an Azure App Service (instead of an VM) such as: https://www.getfishtank.com/blog/installing-solr-app-service-in-sitecore-azure-paas, https://www.iamashishsharma.com/2020/11/install-solr-as-azure-app-service.html or https://sitecorediaries.org/2020/10/08/setting-up-solr-in-cloud-as-an-app-service/

All of them use the default setting for JVM memory (memory for the Java Virtual Machine) - which is 512MB. Generally this isn't enough for Solr in Production and needs increasing to a few GB. It will depend on how much you use search.

On our previous on-prem 16GB VM we had the JVM memory set to 11GB (around 70% of the RAM). I wasn't sure how to do this when running Solr in an Azure App Service though.

1 Answer 1


In order to do this I found I needed to pass an command argument -m in the web.config where the start command is issued like so:

 <httpPlatform processPath="%HOME%\site\wwwroot\bin\solr.cmd"
   arguments="start -p %HTTP_PLATFORM_PORT% -m 11g"

This can be passed in megabytes instead if you prefer, e.g: -m 1024m = 1GB.

Note: I did try to see If I could change settings in: solr.cmd, solr.in.cmd and solr.in.sh to do this instead but couldn't get any of the changes to work so If you know a better way of doing this please comment or add another answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.