Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large file issue: process out of memory #169

Closed
adaromu opened this issue May 2, 2014 · 1 comment
Closed

Large file issue: process out of memory #169

adaromu opened this issue May 2, 2014 · 1 comment

Comments

@adaromu
Copy link

adaromu commented May 2, 2014

I'm trying to convert a 800MB shapefile to TopoJSON format, topojson -q 1e4 -s 1e-8 -p zip=ZCTA5CE10 -o zips_us_topo_zc.json tl_2012_us_zcta510.shp

Every time, when the node memory exceeds 1.99G, it terminated. And shows the information:

FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory
Abort trap: 6

To change the max stack size, I have tried topojson -q 1e4 -s 1e-8 -p zip=ZCTA5CE10 -o zips_us_topo_zc.json tl_2012_us_zcta510.shp --max-stack-size=10737418240 or topojson -q 1e4 -s 1e-8 -p zip=ZCTA5CE10 -o zips_us_topo_zc.json tl_2012_us_zcta510.shp --stack-size=10737418240 , but none of them work.

Local Enviroment:

node v0.10.26
topojson v1.6.9

Is there a way I can add the memory for topojson or other ways to convert these kind large files to topojson format? Thanks!

@adaromu
Copy link
Author

adaromu commented May 2, 2014

Find solution from another ticket: #71
Change the command line to

node --max_old_space_size=8192 `which topojson` -q 1e4 -s 1e-8 -p zip=ZCTA5CE10 -o zips_us_topo_zc.json tl_2012_us_zcta510.shp

It works!

Btw, thanks for your great work on map!

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

No branches or pull requests

1 participant