Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to change the Heap size or other "-X" params of the Hub JVM #159

Closed
charlescapps opened this issue Sep 11, 2015 · 2 comments

Comments

@charlescapps
Copy link

In Config.java, you can see the param string is computed by always prepending "-D" to a key-value pair:
Consequently, using the "grid_jvm_options" option, it's impossible to set "-Xmx4g" or something like that to increase the heap size of the hub.

I will fix this by adding an additional config option, "grid_jvm_x_options" which is just a raw string you can add to the commandline options.

Here's the faulty code that limits us too much:

protected String mapToJvmParams(Map params) {
        String returnString = "";

        for (String key : params.keySet()) {
            Object value = params.get(key);
            String formattedValue = "";

            if (value instanceof Number) {
                formattedValue = "" + ((Number) value).intValue() + "";
            } else {
                formattedValue = value.toString();
            }

            returnString = returnString + "-D" + key + "=" + formattedValue + " ";
        }

        return returnString;
    }
charlescapps pushed a commit to jivesoftware/Selenium-Grid-Extras that referenced this issue Sep 11, 2015
smccarthy added a commit that referenced this issue Oct 8, 2015
Fix issue #159, where you can't pass in "-Xmx" or any option not starting with -D
@charlescapps
Copy link
Author

Thanks for merging my pull request!

@smccarthy
Copy link
Collaborator

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants