1

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).

john miran
  • 393
  • 2
  • 13
  • 1
    add jboss-all.xml and configure dependencies between apps this way they will always start in proper order. – Tomaz Cerar Jan 09 '17 at 16:01
  • Is it only via CLI? What about manual deployment? What version are you using? (there are 3 JavaEE 7 compliant wildfly versions) – thatsIch Jan 10 '17 at 16:14
  • @thatslch i am using full version wildfly 8. manual deployment can't be used since the order of the deployment is not known. to solve my problem, i used the batch command in the cli so that wildfly calculates the dependencies between the wars. however, if i deploy the wars one by one manually the memory doesn't get consumed as much as when batch command is used – john miran Jan 13 '17 at 05:27
  • Deploy the wars with enabled set to false out of a batch, then just call /deployment=foo.war:deploy on your wars in a batch. – ehsavoie Sep 08 '17 at 08:02

1 Answers1

2

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.

hradecek
  • 2,455
  • 2
  • 21
  • 30
  • i don't want to increase the memory size for java. what i need is to reduce the memory consumed by wildfly on deployment, or understand why is it consuming so much memory compared to the size of the war. i updated the question for more details – john miran Jan 09 '17 at 14:35