Skip to content

Close StringIO object to avoid OOM Killer#14

Open
lfarvour-hims wants to merge 1 commit intoSumoLogic-Labs:masterfrom
lfarvour-hims:patch-1
Open

Close StringIO object to avoid OOM Killer#14
lfarvour-hims wants to merge 1 commit intoSumoLogic-Labs:masterfrom
lfarvour-hims:patch-1

Conversation

@lfarvour-hims
Copy link

When this script operates without closing the StringIO objects, it is liable to run out of memory during execution because it is holding onto reasonably large StringIO objects from the recorded future CSV files.

Add an explicit close after chunking the file to clean the object out of memory.

When this script operates without closing the StringIO objects, it is liable to run out of memory during execution because it is holding onto reasonably large StringIO objects from the recorded future CSV files.

Add an explicit close after chunking the file to clean the object out of memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant