【问题标题】:OSRM Extract Silently FailsOSRM 提取静默失败
【发布时间】:2019-04-08 23:57:52
【问题描述】:

我正在尝试使用 Docker 设置 OSRM 后端服务器。主机是运行 OS 10.14 (Mojave) 的具有 32GB RAM 的 MacBook Pro。

下载 england-latest.osm.pbf 文件后,我尝试使用以下命令启动该过程。

docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/england-latest.osm.pbf

输出如下:

[info] Parsed 0 location-dependent features with 0 GeoJSON polygons
[info] Using script /opt/car.lua
[info] Input file: england-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 6
[info] Parsing in progress..
[info] input file generated by osmium/1.8.0
[info] timestamp: 2018-11-02T21:15:02Z
[info] Using profile api version 4
[info] Found 3 turn restriction tags:
[info]   motorcar
[info]   motor_vehicle
[info]   vehicle
[info] Parse relations ...
[info] Parse ways and nodes ...
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4

此时,该过程会静默失败,并且不会写入您期望的任何文件。如果我使用 Greater-london-latest.osm.pbf 文件,那么一切正常,所以我猜这是某种内存限制。我该如何确定问题并解决它?

【问题讨论】:

    标签: osrm


    【解决方案1】:

    在我的 Mac 上遇到同样的问题后,我通过增加 Docker 可用的内存来解决它。在菜单栏上查找鲸鱼图标,单击然后选择首选项 > 高级。将滑块更改为更高的量,按 Apply & Restart,然后再次尝试运行。

    https://docs.docker.com/docker-for-mac/#memory

    我可以使用 415MB 文件(加拿大 > 不列颠哥伦比亚省)在 2GB 默认限制内运行,但不会更大。鉴于 England 文件为 422MB,您可能可以增加到 4GB 并让它工作。 (尝试在整个加拿大运行,一个 2.4GB 的文件,需要 >8GB 的​​ RAM。)

    【讨论】:

    • 谢谢帕特。有道理
    猜你喜欢
    • 1970-01-01
    • 2017-01-10
    • 2018-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-23
    相关资源
    最近更新 更多