Huge amount of memory is required for deploy WAR file using jboss-CLI

1.3k Views Asked by At

I use wildfly appserver, when deploying a war file using Command-Line Interface (CLI) the process requires JVM heap size greater than 10 times the war file size. How can I reduce this memory size that is consumed by jboss-cli during the deployment.

Problem detail:

I have to deploy 8 war files with 100 MB for each file, this process is applied in one transaction using "batch" and "batch.run", the memory consumed by this process exceeds 8GB.

I'm using the batch behavior because i have remote injections between wars, and i don't know the deployment order.

My question is how can I reduce the memory size consumed by wildfly when using jboss-cli, and if there is no way to reduce it, how can i know the deployment order between wars. (e.g. if app1 injects a remote session bean from app2, then the app2 must be deployed before app1).

1

There are 1 best solutions below

1
On

You can define JVM options in $JAVA_OPTS environment variable, which will be loaded by WildFly. For default JVM behavior take a brief look into bin/standalone.conf or bin/domain.conf.