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

Extra -Xms and -Xmx javaOpts. #232

Closed
paddymahoney opened this issue Apr 17, 2014 · 4 comments
Closed

Extra -Xms and -Xmx javaOpts. #232

paddymahoney opened this issue Apr 17, 2014 · 4 comments

Comments

@paddymahoney
Copy link

Sbt native packager version: 0.7.0-RC3
We are using the java server archetype.
Our java opts are set within src/templates/etc-default like follows:
-J-Xmx4096m
-J-Xms1024m
-J-XX:MaxPermSize=1024m
-J-Xss2m
-J-XX:+UseCodeCacheFlushing
-J-XX:ReservedCodeCacheSize=128m
-J-XX:+CMSClassUnloadingEnabled

When the start script is then run with the -d param as follows:
$> /usr/share//bin/ -d

the output looks like:

Executing command line:

java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-Xmx4096m
-Xms1024m
-XX:MaxPermSize=1024m
-Xss2m
-XX:+UseCodeCacheFlushing
-XX:ReservedCodeCacheSize=128m
-XX:+CMSClassUnloadingEnabled

My question is, where are the top three javaOpts being sourced from, and how can they be removed when etc-default is being used to supply the values for those params? While the heap min and max do take on the values that we supply in etc-default rather than the topmost ones, our ops people are concerned by the duplication.

Thank you sbt native packager team!

@jsuereth
Copy link
Member

They come from the -mem options and they SHOULD be disabled when you pass in valid ones. This may be a bug.

@muuki88
Copy link
Contributor

muuki88 commented Apr 18, 2014

This is a bug and already reported in #211
I think this is a problem in the bash script, which doesn't check properly on the -X options. If you use -mem it works correctly. However the -mem generates something like -Xms4096m -Xmx4096m.

The other option would be to override the bash-script (or provide a fix in a PR :) ).

@paddymahoney
Copy link
Author

I will look to fixing this in a PR at some point(unfortunately it looks
like I'll need to fix this on my own time). Is there an sbt-native-packager
dev mailing list or irc? Thank you for your responses.

-P

On 18 April 2014 10:56, Muki notifications@github.com wrote:

This is a bug and already reported in #211#211
I think this is a problem in the bash script, which doesn't check
properly on the -X options. If you use -mem it works correctly.

The other option would be to override the bash-script (or provide a fix in
a PR :) ).


Reply to this email directly or view it on GitHubhttps://github.com//issues/232#issuecomment-40814669
.

@muuki88
Copy link
Contributor

muuki88 commented Apr 24, 2014

Nope. We currently handle issue here at github. Questions are posted on stackoverflow with the sbt-native-packager tag. If you need any help ask here.

kardapoltsev added a commit that referenced this issue May 12, 2014
FIX #211 and #232. Checking $java_args[@] for memory settings, too.
@muuki88 muuki88 closed this as completed May 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants