EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB484147: How to prevent the Kafka .mdmp file from being generated in a Windows system


Ruiyu Han

Senior Support Engineer • MicroStrategy


This article explains why an .mdmp file is generated when the Kafka process crashes or when the Windows operating system is restarted. This article also provides a solution to prevent the .mdmp file from being generated.

Description


When the Kafka process crashes, the Java Virtual Machine (JVM) generates a

.mdmp
file. However, in some scenarios, you may not want the
.mdmp 
file to be generated because it occupies a lot of disk space in the server.

Steps to reproduce 

  1. Start the Kafka service.
  2. Restart the Windows server operating system without shutting down the Kafka service.
  3. Find the .mdmp file generated in the folder:
     C:\Program Files (x86)\MicroStrategy\Messaging Services\Kafka\kafka_2.11-1.1.0.
     
    The file name is: 
    hs_err_pidXXXX.mdmp.

Why is this happening? 


When the Kafka process crashes, the Java Virtual Machine (JVM) generates an 

.mdmp
file. This also occurs when the operating system is restarted without shutting the Kafka service down first. The
.mdmp 
file contains data "dumped" from the program's memory space, which includes information about the error that can be used for debugging.

Solution


Before restarting the operating system, you should first shut down the Kafka service. If this cannot be avoided, you can use the

-XX:-CreateMinidumpOnCrash 
Java paramater. However, in a Windows system, Kafka service is run as a Windows service, so the parameter cannot be added to the Kafka command (.exe file).
Instead, you should proceed with the following steps: 

  • Go to the Start menu > Run. 
  • In the field, enter "Regedit" and click OK.
  • Navigate to
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kafka.
  • Under
    Options
    , modify the Kafka startup parameter by adding the following:
    -XX:-CreateMinidumpOnCrash

ka02R000000g6zYQAQ_0EM2R0000019M3T.jpeg
  • Restart the Windows server.
    The
    .mdmp
    file is no longer generated and instead, the following is recorded in the
    hs_err_pidXXXX.log
    file:
ka02R000000g6zYQAQ_0EM2R0000019M3Y.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

March 27, 2020

Last Updated:

March 27, 2020