Kafka boot, show insufficient memory, modify memory entries

Source: Internet
Author: User
Tags reserved zookeeper xms

Reprinted from: http://www.4byte.cn/question/90076/ Kafka-8-and-memory-there-is-insufficient-memory-for-the-java-runtime-environment-to-continue.html

Above is the original text, the following is a Netizen's translation, translation wording is not accurate, you can directly see English.

question (Question)

I am using Digiocean instance with a megs of RAM, I get the below error with Kafka. I am not a Java proficient dev. How does I adjust Kafka to utilize the small amount of RAM. This is a dev sever. I dont want to pay more per hour for a bigger machine.

#
# There is insufficient memory for the Java Runtime environment to continue.
# Native memory allocation (malloc) failed to allocate 986513408 bytes for committing reserved memory.
# An error report file with more information is saved as:
#//hs_err_pid6500.log
OpenJDK 64-bit Server VM Warning: Info:os::commit_memory (0x00000000bad30000, 986513408, 0) failed; Error= ' Cannot allocate memory ' (ERRNO=12)

I used Digiocean instance 512 megabytes of memory and I got the following error with Franz Kafka. I am not proficient in Java development How to adjust the amount of the use of small Kafka. This is a development server. I want to make more every hour for a bigger machine.

#
# There is insufficient memory for the Java Runtime environment to continue.
# Native memory allocation (malloc) failed to allocate 986513408 bytes for committing reserved memory.
# An error report file with more information is saved as:
#//hs_err_pid6500.log
OpenJDK 64-bit Server VM Warning: Info:os::commit_memory (0x00000000bad30000, 986513408, 0) failed; Error= ' Cannot allocate memory ' (ERRNO=12)
Best Answer (Answer)

You can adjust the JVM heap size by editing kafka-server-start.sh, Zookeeper-server-start.shand so on:

Export kafka_heap_opts= "-xmx1g-xms1g"

THE-XMS parameter specifies the minimum heap size. To get your server-to-least start up, try changing it for use less memory. Given that is 512M, you should the maximum heap size (-XMX) too:

Export kafka_heap_opts= "-xmx256m-xms128m"

I ' m not sure what's the minimal memory requirements of Kafka in default Config Are-maybe your need to adjust the message Si Ze in Kafka to get it to run.

You can adjust the JVM heap size by editing kafka-server-start.sh,zookeeper-server-start.sh, etc.:

Export kafka_heap_opts= "-xmx1g-xms1g"

The-XMS parameter specifies the minimum heap size. Let your server start at least and try to change it using less memory. Since you have only 512M, you should change the maximum heap size (-XMX) too:

Export kafka_heap_opts= "-xmx256m-xms128m"

I don't know what the minimum memory requirement for Kafka in the default profile is that you may need to adjust the size of the message in Kafka to get it running.

question (Question)

I am using Digiocean instance with a megs of RAM, I get the below error with Kafka. I am not a Java proficient dev. How does I adjust Kafka to utilize the small amount of RAM. This is a dev sever. I dont want to pay more per hour for a bigger machine.

#
# There is insufficient memory for the Java Runtime environment to continue.
# Native memory allocation (malloc) failed to allocate 986513408 bytes for committing reserved memory.
# An error report file with more information is saved as:
#//hs_err_pid6500.log
OpenJDK 64-bit Server VM Warning: Info:os::commit_memory (0x00000000bad30000, 986513408, 0) failed; Error= ' Cannot allocate memory ' (ERRNO=12)

I used Digiocean instance 512 megabytes of memory and I got the following error with Franz Kafka. I am not proficient in Java development How to adjust the amount of the use of small Kafka. This is a development server. I want to make more every hour for a bigger machine.

#
# There is insufficient memory for the Java Runtime environment to continue.
# Native memory allocation (malloc) failed to allocate 986513408 bytes for committing reserved memory.
# An error report file with more information is saved as:
#//hs_err_pid6500.log
OpenJDK 64-bit Server VM Warning: Info:os::commit_memory (0x00000000bad30000, 986513408, 0) failed; Error= ' Cannot allocate memory ' (ERRNO=12)
Best Answer (Answer)

You can adjust the JVM heap size by editing kafka-server-start.sh, Zookeeper-server-start.shand so on:

Export kafka_heap_opts= "-xmx1g-xms1g"

THE-XMS parameter specifies the minimum heap size. To get your server-to-least start up, try changing it for use less memory. Given that is 512M, you should the maximum heap size (-XMX) too:

Export kafka_heap_opts= "-xmx256m-xms128m"

I ' m not sure what's the minimal memory requirements of Kafka in default Config Are-maybe your need to adjust the message Si Ze in Kafka to get it to run.

You can adjust the JVM heap size by editing kafka-server-start.sh,zookeeper-server-start.sh, etc.:

Export kafka_heap_opts= "-xmx1g-xms1g"

The-XMS parameter specifies the minimum heap size. Let your server start at least and try to change it using less memory. Since you have only 512M, you should change the maximum heap size (-XMX) too:

Export kafka_heap_opts= "-xmx256m-xms128m"

I don't know what the minimum memory requirement for Kafka in the default profile is that you may need to adjust the size of the message in Kafka to get it running.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.