Request limitation

Are there any limitations on Graphhopper 8.0 Java?
Let me explain why:

I had set up a Docker machine for batch calculation of distances between two addresses. The machine wasn’t very powerful, but it was sufficient to process all of Italy. Additionally, it was on a different PC, so the requests were made through a VPN with the main PC. However, for various reasons, I cannot install Docker on the final machine, so I chose to use the Java version.

The configuration went well, but I don’t understand why the response to each request has a delay of more than 2 seconds.

I’ve tried numerous configurations, using ch/lm threads, changing the distance_influence, increasing the RAM up to 4GB (2GB should be more than enough), and using smaller regions (e.g., northwest).

But nothing seems to work; it always takes more than 2 seconds to process the request. There seems to be a 2-second delay.

I’ve tried making requests directly in the browser, and it’s much faster. I really don’t understand what could be the issue. Are there any limitations?

Thank you all, hoping that you can help me.

No, there is no request limitation for Java but you should ensure that you activate CH. Also ensure that you use an appropriate -Xmx for the JVM.

Thanks for the reply

So there must be some issue with resource management…

I start with this string:

java -Xmx3g -Xms3g -D"dw.graphhopper.datareader.file=nord-ovest-latest.osm.pbf" -jar graphhopper-web-8.0.jar server config-example.yml

Is the delay caused by your VPN connection? Or does rolling the version back resolve the delay?

The problem was when I was working locally. When I used a VPN with a Docker on another machine, it worked well. However, I have now found a way to use a Java VM on another machine, and I no longer have any issues. Probably, 2 cores and 3-4 GB of RAM weren’t sufficient.

Glad you got it sorted, and thanks for posting your solution

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.