2 Replies Latest reply on Jun 9, 2016 4:38 PM by mhemple

    Wildfly 9 - JVM arguments for server groups

    mhemple

      Hi All,

       

      I'm in the process of configuring a HA Wildfly cluster for session replication and I'm having trouble figuring out how to add JVM arguments to the individual servers in the domain.  The arguments I add in domain.conf are applied to the process controller but not the individual servers.  I can change the heap size for the server groups in domain.xml:

       

       

      but I'm having trouble adding other arguments.  Can I use this jvm section to add any argument?  Is there another way to add arguments to server groups?  Thanks.

        • 1. Re: Wildfly 9 - JVM arguments for server groups
          nickarls

          Haven't tried but looking at the schema docs

           

              <xs:complexType name="jvmType">
                  <xs:all minOccurs="0" maxOccurs="1">
                      <xs:element name="heap" type="heapType" minOccurs="0"/>
                      <!-- XX:PermSize, XX:MaxPermSize -->
                      <xs:element name="permgen" type="bounded-memory-sizeType" minOccurs="0"/>
                      <!-- Xss -->
                      <xs:element name="stack" type="memory-sizeType" minOccurs="0"/>
                      <xs:element name="agent-lib" type="jvm-agentLibType" minOccurs="0"/>
                      <xs:element name="agent-path" type="jvm-agentPathType" minOccurs="0"/>
                      <xs:element name="java-agent" type="jvm-javaagentType" minOccurs="0"/>
                      <xs:element name="jvm-options" type="jvm-optionsType" minOccurs="0"/>
                      <xs:element name="environment-variables" type="environmentVariablesType" minOccurs="0"/>
                  </xs:all>
          

           

          it might eat some other stuff, too

          • 2. Re: Wildfly 9 - JVM arguments for server groups
            mhemple

            Thanks Nicklas.  That works.  JVM arguments can also be added in the server groups section of domain.xml using <jvm-options>:

             

            <server-group name="main-server-group" profile="full">
              
            <jvm name="default">
              
            <heap size="64m" max-size="512m"/>
              
            <jvm-options>
                   
            <option value="-XX:-HeapDumpOnOutOfMemoryError"/>
                   
            <option value="-XX:+UseCompressedOops"/>
              
            </jvm-options>
              
            </jvm>
              
            <socket-binding-group ref="full-sockets"/>
            </server-group>