iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

[Bug] fatal error: OutOfMemory encountered: Java heap space

Open alexiskhoury opened this issue 1 year ago • 2 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Version

1.3.4

Describe the bug and provide the minimal reproduce step

I have a standalone configuration of IoTDB on a cloud server witrh 2GB of total memory. I am encountering fatal error due to java heap space several times per day, where datanode seems to stop working. I have configured MEMORY_SIZE in both confignode and datanode so both values are less than 2G (e.g. 600M and 600M) but this is not working. I am attaching the error log.

hs_err_pid67335.log

Any help appreciated.

What did you expect to see?

Sort out this annoying fatal error which is stopping the service. This did not happen before on version 1.2.x

What did you see instead?

The service stops, unable to push any data to database

Anything else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

alexiskhoury avatar May 01 '25 18:05 alexiskhoury

You can consider removing this JVM parameter (CrashOnOutOfCacheError) so that IoTDB does not stop processes when memory overflows (not recommended). It is recommended to use the daemon xxx script to register it as systemd so that it can be automatically pulled up after the process exits. Additionally, you can adjust the memory allocation to allocate more memory to the datanode and less memory to the confignode

CritasWang avatar Jul 17 '25 10:07 CritasWang

Hello everyone,

Thank you for the discussion and suggestions regarding memory allocation and JVM parameters.

I am currently exploring the IoTDB codebase and would like to investigate this issue further, especially the memory behavior of DataNode in low-memory environments.

If the maintainers think it would be helpful, I would be happy to try reproducing the issue and work on a potential fix or improvement. Please let me know if it would be appropriate for me to submit a PR related to this.

Thank you!

anusha975 avatar Mar 07 '26 12:03 anusha975