I am trying to write a program that downloads a large ZIP file, unpacks it into memory, and then pushes the contents (a series of CSV files) into MongoDB. However, I continue to face the fact that the program stops and prints
FATAL ERROR: CodeRange::GetNextAllocationBlock Allocation failed - process out of memory
I set buffers to zero when they are no longer in use, setting records to null as soon as they are in Mongo, and preventing multiple files from being processed at the same time. None of this helped. Are there any other tricks to free memory?
source
share