Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directions API works well in live API but throws "Could not find routable point" in self hosted version #1968

Open
1 task done
Aegon95 opened this issue Feb 13, 2025 · 4 comments
Labels

Comments

@Aegon95
Copy link

Aegon95 commented Feb 13, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Where did you encounter this issue?

self-hosted instance

Request URL

http://localhost:8080/ors/v2/directions/driving-hgv

POST Request Body

{
    "coordinates": [
        [
            "-66.9146008",
            "10.5060934"
        ],
        [
            "-66.91450",
            "10.50587"
        ]
    ],
    "options": {
        "avoid_features": [
            "ferries"
        ]
    },
    "units": "km",
    "radiuses": [
        -1
    ]
}

Response

Response
{
    "error": {
        "code": 2010,
        "message": "Could not find routable point within the maximum possible radius of 20000.0 meters of specified coordinate 0: -66.9146008 10.5060934."
    },
    "info": {
        "engine": {
            "build_date": "2025-01-29T12:32:30Z",
            "graph_version": "1",
            "version": "9.1.0"
        },
        "timestamp": 1739461193879
    }
}

Current behavior

I have checked co-ordinates they are in (lon,lat) format

Live API returns response correctly
https://api.openrouteservice.org/v2/directions/driving-hgv

Self hosted version is using the planet PBF file
https://planet.openstreetmap.org

This is my ors-config.yaml

  engine:
    profile_default:
      service:
        maximum_distance: 9000000
        maximum_distance_dynamic_weights: 9000000
        maximum_snapping_radius: 20000
      build:
        source_file: /home/ors/files/filtered-planet.osm.pbf
    profiles:
      driving-hgv:
        enabled: true

This is my docker compose file

  ors-app:
    build:
      context: ./
    container_name: ors-app
    ports:
      - "8080:8082" 
      - "9001:9001" 
    image: openrouteservice/openrouteservice:v9.1.0
    user: "1001:1002"
    volumes: 
      - ./ors-docker:/home/ors
    environment:
      REBUILD_GRAPHS: False
      CONTAINER_LOG_LEVEL: INFO 
      XMS: 100g
      XMX: 120g 
      ADDITIONAL_JAVA_OPTS: ""  

Expected behavior

200 response with complete data

Openrouteservice Version

9.1.0

Build date

2025-01-29T12:32:30Z

Graph date

No response

Forum Topic Link

No response

@Aegon95 Aegon95 added the api label Feb 13, 2025
@koebi
Copy link
Collaborator

koebi commented Feb 13, 2025

Hey,

52 GB Ram should not at all be enough to build a planet-wide graph for hgv, and building should take a few (at least 10, I'd guess) hours.

Thus, I'm suspecting you are not running planet-wide graphs, but the default heidelberg graph.
Could you check whether the request from the API playground works:

http://localhost:8080/ors/v2/directions/driving-car?start=8.681495,49.41461&end=8.687872,49.420318

or any of the other POST requests?

If it does, check if any other request works.
If it does not, you are running the Heidelberg Graph.

Could you check ors-docker/graphs/* on how big the files there are?

Best regards

@Aegon95
Copy link
Author

Aegon95 commented Feb 15, 2025

52 GB Ram should not at all be enough to build a planet-wide graph for hgv, and building should take a few (at least 10, I'd guess) hours.

You are correct, But i used osmium tool to filter and reduce the file size to 26GB

But still i have to wait 14-15 hours

I still get Exception related to Java heap space

I will increase RAM and see how it goes

Thanks for quick response

@koebi
Copy link
Collaborator

koebi commented Feb 17, 2025

Reducing the file size will not help with RAM usage, as long as you don't filter out things relevant to routing (e.g. highway=*-tags or corresponding ways or the like).

@Aegon95
Copy link
Author

Aegon95 commented Feb 18, 2025

Reducing the file size will not help with RAM usage, as long as you don't filter out things relevant to routing (e.g. highway=*-tags or corresponding ways or the like).

osmium tags-filter planet-250203.osm.pbf w/highway r/type=restriction r/type=route n/w/highway -o filtered-planet.osm.pbf

This is how i filtered planet and reduced file size from 79GB to 26GB

I want to use directions API to find distance by truck between two coordinates.

I increased RAM from 64 to 128, i still get Java error and graphs folder is empty

ors-app | 2025-02-17T23:35:07.819372144Z [thread 57 also had an error]# ors-app | 2025-02-17T23:35:07.826189628Z ors-app | 2025-02-17T23:35:07.826207744Z # There is insufficient memory for the Java Runtime Environment to continue. ors-app | 2025-02-17T23:35:07.826212738Z # Native memory allocation (malloc) failed to allocate 266368 bytes. Error detail: AllocateHeap ors-app | 2025-02-17T23:35:07.826223129Z # An error report file with more information is saved as: ors-app | 2025-02-17T23:35:07.826227544Z # /home/ors/hs_err_pid1.log ors-app | 2025-02-17T23:35:08.959896563Z [thread 69573 also had an error]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants