jvm-arguments

Tomcat Replacing VM arguments

六眼飞鱼酱① 提交于 2019-12-08 07:23:02
问题 this may be a stupid question: I currently have some VM arguments that my web application requires. They are something like: -Dcom.company.custom.var='test' And I access them in code with: System.getProperty("com.company.custom.config") I would like to move them into one of the tomcat xml files (server.xml, context.xml, etc) but I'm not sure how I would go about doing that. So my question is two parts. Where (and how) should I put these variables into xml and how do I access them in code?

Garbage collector usage when upgrade from Java 6 + Tomcat 6 to Java 8 + Tomcat 8

若如初见. 提交于 2019-12-07 12:31:57
问题 We are upgrading from Java 6 and Tomcat 6 to Java 1.8.0_45 and Tomcat 8.0.23, Linux servers, 64 bits. I'm comparing memory usage and I'm facing a weird behaviour. This is how Eden Space looks with Java 8 in Tomcat 8 with no traffic, just started and idle: And this is how it looks with Java 6, standard to me: Both JVMs are configured the same way, basically: XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+DisableExplicitGC -Xms768m -Xmx2048m -Xmn400m With Java 8 and Tomcat 8 minor GC are almost

insufficient memory for the Java Runtime Environment to continue though RAM is showing 6 GB free space

☆樱花仙子☆ 提交于 2019-12-07 01:24:47
问题 While running java application I'm getting the following memory dump. After installing java 8(with java 7 application was working before) I started getting the below error. I'm using 16 GB RAM and in task manager when I checked (while application was starting)around 6 GB RAM was free. Could some one please help what could be the issue? # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 472736 bytes for Chunk:

What is the benefit of setting java.awt.headless=true?

不问归期 提交于 2019-12-06 17:06:14
问题 I have gone through Setting java.awt.headless=true programmatically http://www.oracle.com/technetwork/articles/javase/headless-136834.html and Some other links too. Nowhere it is explained the benefit of using this flag. Is it a performance benefit? If yes, is there even a rough quntization how much performance benefit there will be? (I know that answers to performance questions totally depend upon case to case, but it would be nice to know if someone reported a good benefit from doing this).

Multiple directories in -Djava.library.path

笑着哭i 提交于 2019-12-06 16:36:54
问题 How can I point to two differents java.library.path in eclipse project - run configurations? I need these two libraries: -Djava.library.path=/opt/hdf-java/build/bin -Djava.library.path=/opt/opencv-2.4.10/build/lib Regards. 回答1: On Linux, use colon : as separator (as you will do with the classpath option) as in: -Djava.library.path=/opt/hdf-java/build/bin:/opt/opencv-2.4.10/build/lib 回答2: Use the platform's File.pathSeparator , i.e. ; on Windows and : on *nix, to separate directories, just

How to add jvm parameters for a runnable jar?

心已入冬 提交于 2019-12-06 05:59:10
问题 For the runnable jar that i am creating. it requires xmx1024 as JVM argument. How can i do this ? Or is there any alternative ? 回答1: You can provide a startup script for each and every platform the program is intended to run on. For example on Linux you can have program.sh java -mx1024 -jar lib/artifact.jar arg1 arg2 Obviously you have to tell the user that the program is intended to be run from the startup script, because if they try to manually start the jar it will fail. You can even check

JVM arguments for HTTPS nonProxyHosts

妖精的绣舞 提交于 2019-12-06 01:14:29
问题 So I have a fairly loaded env variable for _JAVA_OPTIONS export _JAVA_OPTIONS="-Dhttp.proxyHost=my-proxy.com -Dhttp.proxyPort=1080 -Dhttps.proxyHost=my-proxy.com -Dhttps.proxyPort=1080 -DsocksProxyHost=my-socks-proxy.com -Dhttp.nonProxyHosts=\"localhost|127.0.0.1|*.local|*.my-co.com\"" However I couldn't get it to ignore an internal server url when I tried it from Scala code using Apache HTTP client API. https://username:pwd@server.my-co.com/foo/bar Do I need to specify a different

Cannot create JVM with -XX:+UseLargePages enabled

我只是一个虾纸丫 提交于 2019-12-05 18:24:17
问题 I have a Java service that currently runs with a 14GB heap. I am keen to try out the -XX:+UseLargePages option to see how this might affect the performance of the system. I have configured the OS as described by Oracle using appropriate shared memory and page values (these can also be calculated with an online tool). Once the OS is configured, I can see that it allocates the expected amount of memory as huge-pages. However, starting the VM with the -XX:+UseLargePages option set always results

Can't set memory settings for `sbt start`

本秂侑毒 提交于 2019-12-05 03:36:28
I'm trying to run sbt start in a Play Framework application written in Scala, on a machine that is an ec2 t2.micro instance on AWS. But i can't because There is insufficient memory for the Java Runtime Environment to continue. The machine has 1GB of memory, but in practice 930MB of free memory to use while running the remaining of OS processes. It is Ubuntu Server 14.04 LTS. The app is small, cute. Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000d5550000, 715849728, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java

What is thread stack size option(-Xss) given to jvm? Why does it have a limit of atleast 68k in a windows pc?

谁说胖子不能爱 提交于 2019-12-05 02:49:16
问题 I have seen JVM option -Xss - What does it do exactly? this link, but my question is how is this option useful. Because, if we set a very minimum limit to the -Xss value, maybe the threads are not going to work properly as it may throw stackOverflow error most of the times. Why is there a 64k limit at least for this value? How i got this 64k limit is when i was trying to configure the runtime vm options on the IntelliJ iDE, I tried to give some thing like 10k and it popped up this error