2

This is a problem, that bugs a customer of ours already for a while. Eventhough we provided a 64-bit JavaFX Desktop Application with JVM Options set to:

[JVMOptions]
-Xmx5120m

Runtime.getRuntime().maxMemory() returns roughly about only 1 GB, eventough the client has 16 GB of RAM available.

The application gets deployed by extracting an archive together with an 64-bit runtime and is builded with fx:deploy ant task. Unfortunatly we are unable to reproduce this error here at any time.

Are there any other possibilities to restrict the memory a Java-Application can use? The customer uses some kind of virtualisation system like citrix receiver with windows 7. Can this have an influence on it? I also read it is possible to restrict the amount of memory an application can use due to windows registry entries?

Any help is greatly appriciated, because we are running out of ideas on how to solve this case.

Additional Information: To gather more information, we wrote a diagnostic tool inside our application which is simular to the one of apache diagnostics. It shows that our -Xmx parameter seems to get overwritten:

diagnostics.vmInfoStartup:
  -Djava.library.path=K:\PATH\APPLICATION\app;K:\PATH\APPLICATION\
  -Djava.launcher.path=K:\PATH\APPLICATION\
  -Dapp.preferences.id=FxApplication
  -Xmx5120m
  -Xmx1024m

But where does the second -Xmx1024m restriction come from? The user starts the EXE deployed from our fx ant task without any further parameters.

crusam
  • 6,140
  • 6
  • 40
  • 68
  • Do you have "log" files from the customer confirming that your JVM is really invoked with the parameters that you expect to be used? – GhostCat Sep 16 '16 at 06:47
  • @GhostCat yes, we do. Added the relevant log information to the question. – crusam Sep 16 '16 at 07:07
  • Maybe try using `-XX:MaxHeapSize` and `-XX:MaxMetaspaceSize`? See [here](https://dzone.com/articles/java-8-permgen-metaspace). Also, maybe there's an environment variable overriding your settings? See [this question](http://stackoverflow.com/questions/28272923/default-xmxsize-in-java-8) – Itai Sep 16 '16 at 08:16
  • With Xmx you are setting the maximum available, maybe this is really restricted by the citrix-environment. If you happen to have access to that environment, you should check normal java-processes behaving the same as the exe-launcher. – FibreFoX Sep 17 '16 at 15:05

0 Answers0