Menu ▾ ▴

#10 Fatal error: Allowed memory size of 8388608 bytes exhausted

current_cvs_version
open
geoformats (8)
7
2004-10-04
2004-10-04
John Foerch
No

Big shapefiles can cause jjfmapper to use more memory
than the limit as set in php.ini.

It is possible to set the memory limit within a php
script, like this:
ini_set("memory_limit","20M");

But I am more inclined to improve memory efficiency of
the shapefile module itself.

Discussion

  • John Foerch

    John Foerch - 2004-10-04
    • priority: 9 --> 7
     
  • John Foerch

    John Foerch - 2004-10-27

    Logged In: YES
    user_id=983545

    I ran into this same error when reading a rather large gpx
    file. To that end I have added a couple of features to
    xml_detail_parser that allow it to conserve memory.

    It does not, by default, store a copy of each tag any more.

    It now accepts as an option, a list of xml elements to
    support. Only those elements will be parsed into memory.
    This means that, for instance, a gpx document nested in a
    jjfmapper config document, will not be parsed as part of the
    jjfmapper config data structure. Furthermore, the gpx
    module only stores in memory those elements from the gpx
    document that it needs.

     
  • John Foerch

    John Foerch - 2004-10-27

    Logged In: YES
    user_id=983545

    I have also changed several instance of "pass by value" to
    "pass by reference". I won't list them all, but this is one
    method that I will continue to use to try to cinch down the
    memory consumption of the mapper.

    I do want to mention that this 8MiB limitation is not
    something I expect to ever fix completely. The nature of
    cartography is such that one can always use more memory, cpu
    speed, and network power.

     

Log in to post a comment.