jvm-arguments

Kafka Consumers throwing java.lang.OutOfMemoryError: Direct buffer memory

大兔子大兔子 提交于 2019-12-02 02:11:00
问题 I am using single node Kafka broker (0.10.2) and single node zookeeper broker (3.4.9). I am having a consumer server ( single core and 1.5 GB RAM ). Whenever I am running a process with 5 or more threads my consumer's threads are getting killed after throwing these exceptions Exception 1 java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.(HeapByteBuffer.java:57) at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) at org.apache.kafka.common.network.NetworkReceive

Kafka Consumers throwing java.lang.OutOfMemoryError: Direct buffer memory

让人想犯罪 __ 提交于 2019-12-02 01:52:36
I am using single node Kafka broker (0.10.2) and single node zookeeper broker (3.4.9). I am having a consumer server ( single core and 1.5 GB RAM ). Whenever I am running a process with 5 or more threads my consumer's threads are getting killed after throwing these exceptions Exception 1 java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.(HeapByteBuffer.java:57) at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:93) at org.apache.kafka.common.network.NetworkReceive.readFrom

Why does the JVM allow to set the “high” value for the IntegerCache, but not the “low”?

吃可爱长大的小学妹 提交于 2019-12-01 14:58:42
We all know that Java has a cache for Integer (and some other types) for number in the range [-128, 127] which are considered to be "commonly used". The cache is designed as follow : private static class IntegerCache { static final int low = -128; static final int high; static final Integer cache[]; static { // high value may be configured by property int h = 127; String integerCacheHighPropValue = sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { int i = parseInt(integerCacheHighPropValue); i = Math.max(i, 127); // Maximum

Why does the JVM allow to set the “high” value for the IntegerCache, but not the “low”?

孤街浪徒 提交于 2019-12-01 13:47:19
问题 We all know that Java has a cache for Integer (and some other types) for number in the range [-128, 127] which are considered to be "commonly used". The cache is designed as follow : private static class IntegerCache { static final int low = -128; static final int high; static final Integer cache[]; static { // high value may be configured by property int h = 127; String integerCacheHighPropValue = sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if

Ghost4J. java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'

风格不统一 提交于 2019-12-01 12:50:27
问题 I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06 . But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64' . I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06 ). Also tried launch application using -Djava.library.path=/path/to/dir . But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound

How to pass 'unsafe' arguments to the JVM of a Java Webstart application

断了今生、忘了曾经 提交于 2019-12-01 09:57:15
问题 My Java Webstart application runs in a controlled trusted environment. This is a closed internal network where I have some control on how the application is started. How can I pass JVM arguments to the application, even if they are considered 'unsecure' for use by webstart by the JVM? 回答1: There are several options to pass JVM arguments to webstart. Through JNLP file. Through the JAVA_TOOL_OPTIONS environment variable. Through the deployment settings on the local computer. Through the javaws

XX:+HeapDumpOnOutOfMemoryError Max file size limit

人盡茶涼 提交于 2019-12-01 04:42:52
问题 I'm running a Java process with the XX:+HeapDumpOnOutOfMemoryError JVM flag and seeing the following output: java.lang.OutOfMemoryError: Java heap space Dumping heap to /local/disk2/heaps/heapdump.hprof ... Dump file is incomplete: file size limit Is there a way to get around this issue? 回答1: The -XX:+HeapDumpOnOutOfMemoryError command-line option tells the HotSpot VM to generate a heap dump when an allocation from the Java heap or the permanent generation cannot be satisfied. There is no

Error in starting namenode in hadoop 2.4.1

做~自己de王妃 提交于 2019-12-01 01:52:33
When I try to start dfs using: start-dfs.sh I get an error saying : 14/07/03 11:03:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Starting namenodes on [OpenJDK 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. localhost] sed: -e expression #1, char 6: unknown option

Error in starting namenode in hadoop 2.4.1

こ雲淡風輕ζ 提交于 2019-11-30 21:04:33
问题 When I try to start dfs using: start-dfs.sh I get an error saying : 14/07/03 11:03:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Starting namenodes on [OpenJDK 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c

How to catch OutOfMemoryError in JVM and run a script if it's caught?

萝らか妹 提交于 2019-11-30 18:58:55
I have a program that sometimes throw OOME, I understand that there is a flag in the JVM options that I can set and whenever a certain Error/Exception appears (such as OOME) it calls a script I wrote. The script will give the user a notification and will call a the program with a different argument so it won't get OOME again. does anyone know how to set this flag? what is the JVM options I need to set? I looked everywhere on line and couldn't find the answer. help me please! Thanks, Aye TuomasR -XX:OnOutOfMemoryError="cmd args;cmd args" From: http://www.oracle.com/technetwork/java/javase/tech