# Specifing the size of data to load to memory

**URL:** <https://discuss.elastic.co/t/specifing-the-size-of-data-to-load-to-memory/156833>\
**Category:** Logstash\
**Created:** [November 15, 2018, 10:35am UTC](https://discuss.elastic.co/t/specifing-the-size-of-data-to-load-to-memory/156833 "2018-11-15T10:35:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![safaa](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@safaa](https://discuss.elastic.co/u/safaa)\
**Post date:** [November 15, 2018, 10:35am UTC](https://discuss.elastic.co/t/specifing-the-size-of-data-to-load-to-memory/156833/1 "2018-11-15T10:35:03Z")

</div>

I have an xml file , and i want to parse it to logstash. The issue is that when i have a large xml file (1Go) , the memory crashes because , the logstash try to load the whole xml file in memory . Is there a way in logstash that recognize adding a specify size of data to memory , and after sending data to elasticsearch , the specified size of data will be deleted , and after that logstash loads the same next size of data to memory?

Thank for your help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2018, 10:35am UTC](https://discuss.elastic.co/t/specifing-the-size-of-data-to-load-to-memory/156833/2 "2018-12-13T10:35:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
