I’m using a GH instance as a routing server with an MMAP_STORE_SYNC storage. Today I did some stress tests and observed that apparently, some long distance route requests (~100km as the crow flies) seemed to have caused GH not responding well to parallel short distance requests. e.g. the log trace showed that some requests seem to have run for about 30 minutes.
Now I have a rather low-end V-Server so I’m not surprised that it doesn’t scale well, but I need to think on how to best “protect” the server against such requests. One option would be to do a quick haversine distance calculation between route points and introduce a threshold value beyond which GH isn’t called anymore (wouldn’t be a problem because the engine is intended smaller distance foot/bike routing anyway). But this is a sort of a hack.
So my question is if there is some way to define a timeout in the GH server so that it terminates requests after a specified time?
Oh, didn’t know that someone is using mmap in production for server-side. Nice to hear that!
For some insights into this topic see the issue 636.
BTW: Are you using CH or non-CH? If using CH that seems to be a disc problem or something as for RAM_STORE it is max. like 100ms even for continental length routes.
Well, I’m testing. So far, I ran DACH plus Italy with GH and the rest of Europe with Routino. Now I have problems building the Routino DB for the entire Europe area, so I began testing with GH and a complete Europe DB… (building the Europe DB runs on a “real” server, takes about 10 hours)
So in a nutshell, only way right now is to set maxVisitedNode since setMaxIdleTime etc. don’t seem to have an effect?
So far I have prepare.chWeightings=no - I guess I can try to build the Europe DB with fastest/shortest, but I definitely can’t use RAM_STORE on the V-Server…
I think there are options for jetty but probably not the right name or specified at the right place etc. You’ll need to try and dig a bit in the docs there I fear.
So far I have prepare.chWeightings=no
I see, so please also checkout the mentioned issue regarding speed improvements and do not forget this setting