X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/b328bcf5186ddfe9f1c2f8acf9eee6859d1410da..fe3eb40e3a8c6721fc2438d6b9484753ac79753a:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 3fad6fe8..782665d7 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -78,11 +78,13 @@ } // Assume we can steal all the cache memory in the box (unless told otherwise) - $iCacheMemory = (isset($aCMDResult['osm2pgsql-cache'])?$aCMDResult['osm2pgsql-cache']:getCacheMemoryMB()); - if ($iCacheMemory > getTotalMemoryMB()) + if (isset($aCMDResult['osm2pgsql-cache'])) + { + $iCacheMemory = $aCMDResult['osm2pgsql-cache']; + } + else { $iCacheMemory = getCacheMemoryMB(); - echo "WARNING: resetting cache memory to $iCacheMemory\n"; } $aDSNInfo = DB::parseDSN(CONST_Database_DSN); @@ -198,7 +200,7 @@ $osm2pgsql .= ' --tablespace-main-data '.CONST_Tablespace_Place_Data; if (CONST_Tablespace_Place_Index) $osm2pgsql .= ' --tablespace-main-index '.CONST_Tablespace_Place_Index; - $osm2pgsql .= ' -lsc -O gazetteer --hstore'; + $osm2pgsql .= ' -lsc -O gazetteer --hstore --number-processes 1'; $osm2pgsql .= ' -C '.$iCacheMemory; $osm2pgsql .= ' -P '.$aDSNInfo['port']; $osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file'];