<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello all:<br>
    <br>
    Maybe this just isn't going to work, but I'm trying to use osm2pgsql
    to process a small set of XML that I've downloaded through the
    Overpass API.<br>
    <br>
    I'm running this on an EC2 micro instance, which supposedly has up
    to 613 MB of RAM. That's not a lot, but the XML I'm trying to import
    is only 23 ways made up of 191 nodes. This will grow, but not by
    orders of magnitude.<br>
    <br>
    So I'm running:<br>
    <br>
    osm2pgsql ./data/latest.xml -d border_processing -S
    /home/border/osm_scraper/mystyle.style --slim --cache 128
    --extra-attributes<br>
    <br>
    Which fails, returning at the end:<br>
    <br>
    Allocating memory for dense node cache<br>
    Allocating dense node cache in one big chunk<br>
    Allocating memory for sparse node cache<br>
    Sharing dense sparse<br>
    Node-cache: cache=128MB, maxblocks=16385*8192, allocation method=11<br>
    Mid: pgsql, scale=100 cache=128<br>
    Setting up table: planet_osm_nodes<br>
    NOTICE:  table "planet_osm_nodes" does not exist, skipping<br>
    NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
    "planet_osm_nodes_pkey" for table "planet_osm_nodes"<br>
    Setting up table: planet_osm_ways<br>
    NOTICE:  table "planet_osm_ways" does not exist, skipping<br>
    NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
    "planet_osm_ways_pkey" for table "planet_osm_ways"<br>
    Setting up table: planet_osm_rels<br>
    NOTICE:  table "planet_osm_rels" does not exist, skipping<br>
    NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
    "planet_osm_rels_pkey" for table "planet_osm_rels"<br>
    <br>
    Reading in file: ./data/latest.xml<br>
    StartElement: Unknown element name: note<br>
    Unknown node type 3<br>
    EndElement: Unknown element name: note<br>
    StartElement: Unknown element name: meta<br>
    EndElement: Unknown element name: meta<br>
    Segmentation fault (core dumped)<br>
    <br>
    If I up the cache to anything over 500 MB then I run out of memory
    on the EC2 instance.<br>
    <br>
    How much memory does osm2pgsql need for something seemingly small
    like this? Can I reduce the load significantly by cutting out other
    attributes in my config file? Any other suggestions?<br>
    <br>
    Thanks much,<br>
    <br>
    <div class="moz-signature">-- <br>
      Michael Corey<br>
      News Applications Developer<br>
      Center for Investigative Reporting<br>
      510.809.3178<br>
      <br>
      <em>2012 Recipient of the MacArthur Award for Creative and
        Effective Institutions</em></div>
  </body>
</html>