X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/00cd69ea237c44fa76d450739240fab3223b845f..fa0cf215e723401fec62a3b336a4ed8908c2bfed:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 3bbe18d4..be422949 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);