(R error) Error: cons memory exhausted (limit reac

2019-05-11 05:20发布

问题:

I am working with big data and I have a 70GB JSON file. I am using jsonlite library to load in the file into memory.

I have tried AWS EC2 x1.16large machine (976 GB RAM) to perform this load but R breaks with the error: Error: cons memory exhausted (limit reached?) after loading in 1,116,500 records. Thinking that I do not have enough RAM, I tried to load in the same JSON on a bigger EC2 machine with 1.95TB of RAM.

The process still broke after loading 1,116,500 records. I am using R version 3.1.1 and I am executing it using --vanilla option. All other settings are default.

here is the code:

library(jsonlite)
data <- jsonlite::stream_in(file('one.json'))

Any ideas?

标签: r bigdata