Replace grasshopper's osm file

Hi, a question I have is for a project that I had in college:

I have a server which serves paths for the web requests using a graphhopper singleton that is initialized when starting the server. Since I was starting with very limited storage size, I had only a couple of cities from my country and even those files are getting outdated. After merging or updating these files, I have to “import or load”, which causes that Graphhopper can’t serve paths during this time.

My question is if it’s possible to replace the graphhopper .osm file on the fly while still serving requests with previous .osm file until the importing is complete. Is there a convention or a best practice for doing this?

Thanks in advance for any help

There are multiple approaches, either via different JVMs or with multiple GH instances per JVM, but nothing currently inbuilt. See also discussion here

Thanks, I’ll check it out