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

Provide error logs and prevent freezing system for ORS internal errors #56

Closed
temospena opened this issue May 17, 2018 · 5 comments
Closed
Assignees
Labels
fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path

Comments

@temospena
Copy link

temospena commented May 17, 2018

Hi. I really like this API, thanks!

I'm trying to use the route (row to row) between 1000 points that are in a city, so not that far away from each others.
When opting for driving and walking regular, the fastest and the shortest, runs with no problem.
When I choose cycling regular (fastest or shortest), it starts to run, and then it gets stuck forever in the message "Requesting analysis from ORS...", at 16%.
I can see it using the quota of 40/min on my user dashboard, every time I refresh it ads more, but it gets stuck at 362.
It is not a quota problem, I'm waiting more than 1 day to run it.

Do you know what it may be, if that transportation mode has another requirements different than car or walk?

@nilsnolde
Copy link
Contributor

The difference between the profiles is it uses a different road graph, so our APIs could get stuck for cycling-regular, when there's no route for bikes for some reason. However, it should throw an error message in that case.

Is it always the same location pair messing it up? If so, can you post the request parameters, i.e. profile, coordinates, any additional parameters you set in the GUI?

@nilsnolde nilsnolde self-assigned this May 22, 2018
@temospena
Copy link
Author

temospena commented May 23, 2018

Hi nilsnode,
Thank you for your reply.

In fact it shows an error, showing the coordinates of the first pair that gets stuck, but it is very quick and the error disappears, so I can't identify on the table. If it was logging the ID or even the coordinates on the log error messages, it would be easier to identify the problematic pairs.
But after all, I found 4 problematic OD pairs.
The parameters were: cycling-regular, fastest, row by row. The coordinates of the points are:

ID | O_Lat | O_Long | D_Lat | D_Long
989 | 38.7161417 | -9.1367400 | 38.7147636 | -9.1259705
189 | 38.7260017 | -9.1325994 | 38.7791838 | -9.1332335
505 | 38.7007466 | -9.3802553 | 38.8027935 | -9.1393041
1407 | 38.6119220 | -9.1336965 | 38.7501646 | -9.1488146

Thanks

@nilsnolde
Copy link
Contributor

nilsnolde commented May 23, 2018

Hi,
yes, I can confirm that the first 2 routes cannot be calculated with a cycling-x profile:

{
    "error": {
        "code": 2009,
        "message": "Route could not be found - Unable to find a route between points 1 (-9.1325994 38.7260017) and 2 (-9.1332335 38.7791838)."
    },
    "info": {
        "engine": {
            "version": "4.5.0",
            "build_date": "2018-03-26T12:51:50Z"
        },
        "timestamp": 1527091866037
    }
}

But you're right: I have to change the plugin to write some sort of log with requests and at least error messages. I have some time on my hands the next 7-8 days, I might finally go for the long-dreaded refactoring of the whole code-base and include this fix.

In the meantime, if you encounter anything like this again:

Try our interactive request console (press Switch to Console in the upper right). This will let you request directly and see the error message (if any). Or use tools like Postman, very useful to query APIs sustainably.

@nilsnolde nilsnolde changed the title Issue when mode is cycling Provide error logs and prevent freezing system for ORS internal errors May 23, 2018
@nilsnolde
Copy link
Contributor

Also this issue is addressed in the development branch. ORS Tools writes to its own QGIS log now, if there's an API error.

@nilsnolde nilsnolde added the fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path label Feb 26, 2019
@nilsnolde
Copy link
Contributor

fixed in newest master and available in plugin repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path
Projects
None yet
Development

No branches or pull requests

2 participants