简体   繁体   English

在自己安装的OpenStreetMap的Overpass API中增加最大内存限制

[英]Increase maximum memory limit in own install of OpenStreetMap's Overpass API

For my specific purpose, I need to alter Overpass API's definition of an area to include all buildings, whether or not they have names (so is_in() will return these buildings when requested). 为了我的特定目的,我需要更改一个area Overpass API定义,以包括所有建筑物,无论它们是否具有名称(因此is_in()将在请求时返回这些建筑物)。

To achieve this, I've installed a local copy of the API with 3 specific countries and have modified the os3m script that generates areas to suite my definition -- so far, so good. 为此,我已经在3个特定国家/地区安装了API的本地副本,并修改了os3m脚本,该脚本生成了适合我的定义的区域-到目前为止,一切都很好。

Obviously this script will require more memory than the default one as it is handling a lot more ways . 很明显,因为它是处理多了很多 ,该脚本将需要比默认的一个更多的内存ways The machine I'm running on has 16GB of RAM . 我正在运行的计算机具有16GB of RAM If I specify 2GB or less for the script (ie element-limit="2073741824" ) then it will run out of memory, but specifying any more (even by 100MB) will always result in the error: 如果我为脚本指定2GB或更少的空间(即element-limit="2073741824" ),那么它将耗尽内存,但是指定更多(甚至100MB)将始终导致错误:

Dispatcher_Client::request_read_and_idx::timeout Dispatcher_Client :: request_read_and_idx ::超时

after just a few seconds. 几秒钟后。

The question is, how I can tell the Overpass API/dispatchers that using more than 2GB is perfectly fine, and in fact, allow it to allocate up to ~15GB for this query? 问题是,如何告诉Overpass API /调度程序使用2GB以上的2GB是完全可以的,实际上,允许它为此查询分配~15GB 2GB吗?

You could try to increase both values for total_available_space in settings.cc (currently at 4GB) and recompile Overpass API from source. 您可以尝试增加total_available_space中的total_available_space两个值(当前为4GB),并从源代码重新编译Overpass API。

AFAIK nobody has tried to process a huge number of buildings via areas before, so be prepared for further issues. AFAIK之前没有人尝试过通过区域处理大量建筑物,因此请为进一步的问题做好准备。 The Overpass API developer list may be a good place to discuss this, also to get Roland's attention (Overpass API developer/maintainer), as he's not around on stackoverflow. Overpass API开发人员列表可能是讨论此问题的好地方,也可以引起Roland的注意(Overpass API开发人员/维护人员),因为Roland不在stackoverflow上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM