Hello, I know this has been posted many times, but no answer posted has been able to fix my problem. I'm trying to import planet-latest.osm (planet Open Street Map) I tried using the following command: osm2pgsql -c -S /usr/share/osm2pgsql/default.style --slim -d osm --flat-nodes /var/tmp/flat-nodes.bin --number-processes 8 -C 25000 planet-latest.osm At the begining, it failed because my node cache wasn't high enough. After I increased it, I've read it was getting killed because I needed 40G ram without --slim, so I used slim. Then I've read it was killed because I needed --flat-nodes with --slim, so I used --flat-nodes. I can't find what I am doing wrong. I'm sure it is obvious for some of you what I am doing wrong. If you can help me, I would realy appreciate it. Thanks! PS: I'm running on Ubuntu VM using 32G Ram VM has approx 1000G space available using 8 process I get the message: Reading in file: planet-latest.osm Processing: Node(2418060k 86.4k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Killed And then I get back into command line. asked 24 Apr '15, 13:41 Qalisto |
As scai has pointed out you are likely running out of memory, you will need to add swap (which while slower is still preferrable to any other solution). Further I would suggest not running with 8 threads which, given the size of your machine, is likely to be counter productive. answered 26 Apr '15, 10:16 SimonPoole ♦ |
Check
dmesg
for a message containing Out of memory and/or oomkiller. If this message appears then you will need to add more ram or more swap, the latter being significantly slower.... and (just in case you haven't already done this) I'd definitely run the process all the way through on a smaller extract first - and obviously if you don't have a need to render the whole planet, it makes sense to use a smaller extract anyway.