Wildfly and JVM arguments

622 views
Skip to first unread message

Craig Greenhalgh

unread,
Aug 25, 2015, 10:17:49 AM8/25/15
to codehau...@googlegroups.com
Hi,

I dont think the property is being placed at the correct place, as it wont allow me to override the memory settings.

I use the property

<cargo.jvmargs>-ms512m -mx2G</cargo.jvmargs>


...and this get picked up, however it looks like cargo is also setting some default settings ?  In my boot log I have :


2015-08-25 13:02:16,606 DEBUG [org.jboss.as.config] (MSC service thread 1-7) VM Arguments: -Xms512m -Xmx2G -Xms128m -Xmx512m -D[Standalone] -Dorg.jboss.boot.log.file=.....

My properties are being used, but look like they are being overriden by some defaults (-Xms128m -Xmx512m) as they are placed after mine.  Where are these defaults set ?  They are different to those in the standalone files.

Is this as intended, or is this a bug ?

If this is intended, how can I override the memory settings for the Wildfly server


Thanks for your help

Craig

S. Ali Tokmen

unread,
Aug 27, 2015, 3:18:31 PM8/27/15
to codehau...@googlegroups.com
Hi Craig

I think you have a typo - The corrent cargo.jvmargs to use is with -Xmx and -Xms

Maybe you can send your pom.xml?

Regards

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CACwRV0X%3DvL%3Db06JuPh8agmbJbr2-2B7Tfoc7nbCEUvA7SdKETw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Craig Greenhalgh

unread,
Sep 4, 2015, 6:41:39 AM9/4/15
to Codehaus Cargo
Hi many thanks for your help,

Im not sure its a typo in the cargo property name as it is getting picked up (shown in the wildfly logs)

The specific properties are:

        <jboss.host>localhost</jboss.host>
        <jboss.port>82</jboss.port>
        <jboss.jvmargs>-ms512m -mx2G</jboss.jvmargs>

The plugin is defined as:

           <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <configuration>
                    <skip>${build.skip.cargo}</skip>
                    <container>
                        <containerId>wildfly8x</containerId>
                        <timeout>720000</timeout>
                        <zipUrlInstaller>
                            <url>http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip</url>
                        </zipUrlInstaller>
                        <dependencies>
                            <dependency>
                                <groupId>com.microsoft.sqlserver.jdbc</groupId>
                                <artifactId>sqljdbc4</artifactId>
                            </dependency>
                            <dependency>
                                <groupId>net.sourceforge.jtds</groupId>
                                <artifactId>jtds</artifactId>
                            </dependency>
                        </dependencies>
                    </container>
                    <configuration>
                        <type>standalone</type>
                        <files>
                            <copy>
                                <file>${basedir}/target/test-classes/standalone.xml</file>
                                <tofile>configuration/standalone.xml</tofile>
                                <configfile>true</configfile>
                                <overwrite>true</overwrite>
                            </copy>
                        </files>
                        <properties>
                            <cargo.jvmargs>${jboss.jvmargs}</cargo.jvmargs>
                            <cargo.jboss.ajp.port>18009</cargo.jboss.ajp.port>
                            <cargo.servlet.port>${jboss.port}</cargo.servlet.port>
                            <cargo.logging>high</cargo.logging>
                        </properties>
                    </configuration>
                </configuration>
                <executions>
                    <execution>
                        <id>start-jboss</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                        <configuration>
                            <deployer>
                                <type>installed</type>
                            </deployer>
                            <deployables>
                                <deployable>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${war.artifact}</artifactId>
                                    <type>war</type>
                                    <pingURL>http://${jboss.host}:${jboss.port}/${webapp.contextroot}/${war.ping.url}</pingURL>
                                    <pingTimeout>120000</pingTimeout>
                                </deployable>
                            </deployables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-jboss</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

S. Ali Tokmen

unread,
Sep 4, 2015, 4:44:44 PM9/4/15
to codehau...@googlegroups.com
Hi Craig

Yes, you have a typo. The correct syntax for JVM arguments would be:
-Xms512m -Xmx2g
This is actually the Oracle Java non-standard options, but is supported as is by almost all JVMs: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABHDABI

Hope this helps
Reply all
Reply to author
Forward
0 new messages