.hprof files keep getting generated under the LogServer Elasticsearch folder

Problem Description

Too many .hpro files such as java_pid2072.hprof, are being generated in the <LOGSERVER>\Elasticsearch-x.x.x folder. Each file is about 1.5 GB in size.


Why are these files being generated, and how do you stop them from filling up the disk space?



Root Cause

These .hprof files are Java heap dumps automatically generated each time there is an OutOfMemoryException, and if the Java option HeapDumpOnOutOfMemoryError is specified.


By default, LogServer/Elasticsearch is set up with a max heap size of 1 Gb. When there is a lot of data to process, and the max heap size is reached, it triggers the OutOfMemoryException, which in turn generates these dumps.



  1. Increase the max heap size (-Xmx option), for example, to 2 GB or 3 GB.

  2. Remove the Java option -XX:+HeapDumpOnOutOfMemoryError, so the dumps are not generated when there is an OutOfMemoryException.

To change these settings when LogServer is already installed and running as Windows service, perform the following steps:

  1. Open a DOS console to the <LOGSERVER-PATH>\elasticsearch-x.x.x\bin\ folder (x.x.x differs based on the version).

  2. Run one of the following commands:

    Talend LogServer version 6.x

    service.bat manager

    Talend LogServer version 7.x

    elasticsearch-service.bat manager
  3. The Talend LogServer Search Engine x.x.x Properties window opens. Select the Java tab, then remove -XX:+HeapDumpOnOutOfMemoryError from the Java Options list.

  4. Increase max heap size from 1 GB (-Xmx1g) to 2 GB (-Xmx2g).



  5. Click OK to save.

  6. Restart the LogServer service, Talend LogServer Search Engine.

Version history
Revision #:
5 of 5
Last update:
‎10-14-2019 05:10 AM
Updated by: