OOM while running server

I have generated graph-cache for planet by running import in high config machine(128 GB).
I transferred graph-cache to low config machine(30 GB) when I run server command its throwing OOM error
command for server
java -jar graphhopper-web-9.1.jar server conf.yml &

yml file below any changes I could do to run in 30 GB and even lower config 8/16 GB.
Please share some insights.
Thanks in advance.

graphhopper:

  # OpenStreetMap input file PBF or XML, can be changed via command line -Ddw.graphhopper.datareader.file=some.pbf
  datareader.file: "planet-latest.osm.pbf"
  # Local folder used by graphhopper to store its data
  graph.location: graph-cache
  graph.dataaccess.default_type: MMAP


  ##### Routing Profiles ####

  # Routing can be done only for profiles listed below. For more information about profiles and custom profiles have a
  # look into the documentation at docs/core/profiles.md or the examples under web/src/test/java/com/graphhopper/application/resources/
  # or the CustomWeighting class for the raw details.
  #
  # In general a profile consists of the following
  # - name (required): a unique string identifier for the profile
  # - weighting (optional): by default 'custom'
  # - turn_costs (optional):
  #     vehicle_types: [motorcar, motor_vehicle] (vehicle types used for vehicle-specific turn restrictions)
  #     u_turn_costs: 60 (time-penalty for doing a u-turn in seconds)
  #
  # Depending on the above fields there are other properties that can be used, e.g.
  # - custom_model_files: when you specified "weighting: custom" you need to set one or more json files which are searched in
  #   custom_models.directory or the working directory that defines the custom_model. If you want an empty model you can
  #   set "custom_model_files: []
  #   You can also use the `custom_model` field instead and specify your custom model in the profile directly.
  #
  # To prevent long running routing queries you should usually enable either speed or hybrid mode for all the given
  # profiles (see below). Or at least limit the number of `routing.max_visited_nodes`.

  profiles:
   - name: car
#     turn_costs:
#       vehicle_types: [motorcar, motor_vehicle]
#       u_turn_costs: 60
     custom_model_files: [car.json]

#   You can use the following in-built profiles. After you start GraphHopper it will print which encoded values you'll have to add to graph.encoded_values in this config file.
#
#    - name: foot
#      custom_model_files: [foot.json, foot_elevation.json]
#
#    - name: bike
#      custom_model_files: [bike.json, bike_elevation.json]
#
#    - name: racingbike
#      custom_model_files: [racingbike.json, bike_elevation.json]
#
#    - name: mtb
#      custom_model_files: [mtb.json, bike_elevation.json]
#
#    # See the bus.json for more details.
#    - name: bus
#       turn_costs:
#         vehicle_types: [bus, motor_vehicle]
#         u_turn_costs: 60
#      custom_model_files: [bus.json]
#
#   Other custom models not listed here are: car4wd.json, motorcycle.json, truck.json or cargo-bike.json. You might need to modify and test them before production usage.
#   See ./core/src/main/resources/com/graphhopper/custom_models and let us know if you customize them, improve them or create new onces!
#   Also there is the curvature.json custom model which might be useful for a motorcyle profile or the opposite for a truck profile.
#   Then specify a folder where to find your own custom model files:
#  custom_models.directory: custom_models


  # Speed mode:
  # It's possible to speed up routing by doing a special graph preparation (Contraction Hierarchies, CH). This requires
  # more RAM/disk space for holding the prepared graph but also means less memory usage per request. Using the following
  # list you can define for which of the above routing profiles such preparation shall be performed. Note that to support
  # profiles with `turn_costs: true` a more elaborate preparation is required (longer preparation time and more memory
  # usage) and the routing will also be slower than with `turn_costs: false`.
  profiles_ch:
    - profile: car

  # Hybrid mode:
  # Similar to speed mode, the hybrid mode (Landmarks, LM) also speeds up routing by doing calculating auxiliary data
  # in advance. Its not as fast as speed mode, but more flexible.
  #
  # Advanced usage: It is possible to use the same preparation for multiple profiles which saves memory and preparation
  # time. To do this use e.g. `preparation_profile: my_other_profile` where `my_other_profile` is the name of another
  # profile for which an LM profile exists. Important: This only will give correct routing results if the weights
  # calculated for the profile are equal or larger (for every edge) than those calculated for the profile that was used
  # for the preparation (`my_other_profile`)
  profiles_lm: []


  #### Encoded Values ####

  # Add additional information to every edge. Used for path details (#1548) and custom models (docs/core/custom-models.md)
  # Default values are: road_class,road_class_link,road_environment,max_speed,road_access
  # More are: surface,smoothness,max_width,max_height,max_weight,max_weight_except,hgv,max_axle_load,max_length,
  #           hazmat,hazmat_tunnel,hazmat_water,lanes,osm_way_id,toll,track_type,mtb_rating,hike_rating,horse_rating,
  #           country,curvature,average_slope,max_slope,car_temporal_access,bike_temporal_access,foot_temporal_access
  graph.encoded_values: car_access, car_average_speed

  #### Speed, hybrid and flexible mode ####

  # To make CH preparation faster for multiple profiles you can increase the default threads if you have enough RAM.
  # Change this setting only if you know what you are doing and if the default worked for you.
  # prepare.ch.threads: 1

  # To tune the performance vs. memory usage for the hybrid mode use
  # prepare.lm.landmarks: 16

  # Make landmark preparation parallel if you have enough RAM. Change this only if you know what you are doing and if
  # the default worked for you.
  # prepare.lm.threads: 1


  #### Elevation ####

  # To populate your graph with elevation data use SRTM, default is noop (no elevation). Read more about it in docs/core/elevation.md
  # graph.elevation.provider: srtm

  # default location for cache is /tmp/srtm
  # graph.elevation.cache_dir: ./srtmprovider/

  # If you have a slow disk or plenty of RAM change the default MMAP to:
  # graph.elevation.dataaccess: RAM_STORE

  # To enable bilinear interpolation when sampling elevation at points (default uses nearest neighbor):
  # graph.elevation.interpolate: bilinear

  # Reduce ascend/descend per edge without changing the maximum slope:
  # graph.elevation.edge_smoothing: ramer
  # removes elevation fluctuations up to max_elevation (in meter) and replaces the elevation with a value based on the average slope
  # graph.elevation.edge_smoothing.ramer.max_elevation: 5
  # Using an averaging approach for smoothing will reveal values not affected by outliers and realistic slopes and total altitude values (up and down)
  # graph.elevation.edge_smoothing: moving_average
  # window size in meter along a way used for averaging a node's elevation
  # graph.elevation.edge_smoothing.moving_average.window_size: 150


  # To increase elevation profile resolution, use the following two parameters to tune the extra resolution you need
  # against the additional storage space used for edge geometries. You should enable bilinear interpolation when using
  # these features (see #1953 for details).
  # - first, set the distance (in meters) at which elevation samples should be taken on long edges
  # graph.elevation.long_edge_sampling_distance: 60
  # - second, set the elevation tolerance (in meters) to use when simplifying polylines since the default ignores
  #   elevation and will remove the extra points that long edge sampling added
  # graph.elevation.way_point_max_distance: 10


  #### Country-dependent defaults for max speeds ####

  # This features sets a maximum speed in 'max_speed' encoded value if no maxspeed tag was found. It is country-dependent
  # and based on several rules. See https://github.com/westnordost/osm-legal-default-speeds
  # To use it uncomment the following, then enable urban density below and add 'country' to graph.encoded_values
  # max_speed_calculator.enabled: true


  #### Urban density (built-up areas) ####

  # This feature allows classifying roads into 'rural', 'residential' and 'city' areas (encoded value 'urban_density')
  # Use 1 or more threads to enable the feature
  # graph.urban_density.threads: 8
  # Use higher/lower sensitivities if too little/many roads fall into the according categories.
  # Using smaller radii will speed up the classification, but only change these values if you know what you are doing.
  # If you do not need the (rather slow) city classification set city_radius to zero.
  # graph.urban_density.residential_radius: 400
  # graph.urban_density.residential_sensitivity: 6000
  # graph.urban_density.city_radius: 1500
  # graph.urban_density.city_sensitivity: 1000


  #### Subnetworks ####

  # In many cases the road network consists of independent components without any routes going in between. In
  # the most simple case you can imagine an island without a bridge or ferry connection. The following parameter
  # allows setting a minimum size (number of edges) for such detached components. This can be used to reduce the number
  # of cases where a connection between locations might not be found.
  prepare.min_network_size: 200
  prepare.subnetworks.threads: 1

  #### Routing ####

  # You can define the maximum visited nodes when routing. This may result in not found connections if there is no
  # connection between two points within the given visited nodes. The default is Integer.MAX_VALUE. Useful for flexibility mode
  # routing.max_visited_nodes: 1000000

  # The maximum time in milliseconds after which a routing request will be aborted. This has some routing algorithm
  # specific caveats, but generally it should allow the prevention of long-running requests. The default is Long.MAX_VALUE
  # routing.timeout_ms: 300000

  # Control how many active landmarks are picked per default, this can improve query performance
  # routing.lm.active_landmarks: 4

  # You can limit the max distance between two consecutive waypoints of flexible routing requests to be less or equal
  # the given distance in meter. Default is set to 1000km.
  routing.non_ch.max_waypoint_distance: 1000000


  #### Storage ####

  # Excludes certain types of highways during the OSM import to speed up the process and reduce the size of the graph.
  # A typical application is excluding 'footway','cycleway','path' and maybe 'pedestrian' and 'track' highways for
  # motorized vehicles. This leads to a smaller and less dense graph, because there are fewer ways (obviously),
  # but also because there are fewer crossings between highways (=junctions).
  # Another typical example is excluding 'motorway', 'trunk' and maybe 'primary' highways for bicycle or pedestrian routing.
  import.osm.ignored_highways: footway,cycleway,path,pedestrian,steps # typically useful for motorized-only routing
  # import.osm.ignored_highways: motorway,trunk # typically useful for non-motorized routing

  # configure the memory access, use RAM_STORE for well equipped servers (default and recommended)
  graph.dataaccess.default_type: RAM_STORE

  # will write way names in the preferred language (language code as defined in ISO 639-1 or ISO 639-2):
  # datareader.preferred_language: en

  #### Custom Areas ####

  # GraphHopper reads GeoJSON polygon files including their properties from this directory and makes them available
  # to all tag parsers and custom models. All GeoJSON Features require to have the "id" property.
  # Country borders are included automatically (see countries.geojson).
  # custom_areas.directory: path/to/custom_areas


  #### Country Rules ####

  # GraphHopper applies country-specific routing rules during import (not enabled by default).
  # You need to redo the import for changes to take effect.
  # country_rules.enabled: true

# Dropwizard server configuration
server:
  application_connectors:
  - type: http
    port: 8989
    # for security reasons bind to localhost
    # bind_host: localhost
    # increase GET request limit - not necessary if /maps UI is not used or used without custom models
    max_request_header_size: 50k
  request_log:
      appenders: []
  admin_connectors:
  - type: http
    port: 8990
    # bind_host: localhost
# See https://www.dropwizard.io/en/latest/manual/core.html#logging
logging:
  appenders:
    - type: file
      time_zone: UTC
      current_log_filename: logs/graphhopper.log
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
      archive: true
      archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
      archived_file_count: 30
      never_block: true
    - type: console
      time_zone: UTC
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  loggers:
    "com.graphhopper.osm_warnings":
      level: DEBUG
      additive: false
      appenders:
        - type: file
          currentLogFilename: logs/osm_warnings.log
          archive: false
          logFormat: '[%level] %msg%n'

You can read through this blog post where several variants are discussed:

Basically if the graph-cache folder is bigger than the physical RAM you’ll have to use MMAP as otherwise it won’t fit into memory.

@karussell yes the graph-cache folder is higher than physical RAM.
As mentioned in the file above I have put

graph.dataaccess.default_type: MMAP

Even though I am facing the issue.
Am I missing anything?

What is the stacktrace or error you are facing and how large is the graph-cache folder in total or better list every single file?

@karussell
Please find file list and stack trace below

total 40G
-rw-rw-r-- 1 sas sas  17K Aug  6 00:21 edgekv_keys
-rw-rw-r-- 1 sas sas 852M Aug  6 00:21 edgekv_vals
-rw-rw-r-- 1 sas sas  15G Aug  6 00:17 edges
-rw-rw-r-- 1 sas sas  11G Aug  6 00:20 geometry
-rw-rw-r-- 1 sas sas 2.6G Aug  6 00:22 location_index
-rw-rw-r-- 1 sas sas 3.6G Aug  6 00:13 nodes
-rw-rw-r-- 1 sas sas 2.4G Aug  6 00:12 nodes_ch_car
-rw-rw-r-- 1 sas sas  33K Aug  6 00:21 properties
-rw-rw-r-- 1 sas sas 3.7K Aug  6 00:21 properties.txt
-rw-rw-r-- 1 sas sas 5.0G Aug  6 00:21 shortcuts_car
2024-08-06 02:24:34.422 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @1892ms to org.eclipse.jetty.util.log.Slf4jLog
2024-08-06 02:24:34.507 [main] INFO  i.d.server.DefaultServerFactory - Registering jersey handler with root path prefix: /
2024-08-06 02:24:34.508 [main] INFO  i.d.server.DefaultServerFactory - Registering admin handler with root path prefix: /
2024-08-06 02:24:34.766 [main] INFO  io.dropwizard.assets.AssetsBundle - Registering AssetBundle with name: assets for path /maps/*
2024-08-06 02:24:34.768 [main] INFO  io.dropwizard.assets.AssetsBundle - Registering AssetBundle with name: webjars for path /webjars/*
2024-08-06 02:24:34.773 [main] INFO  io.dropwizard.server.ServerFactory - Starting GraphHopperApplication
                        _     _
   __ _ _ __ __ _ _ __ | |__ | |__   ___  _ __  _ __   ___ _ __
  / _` | '__/ _` | '_ \| '_ \| '_ \ / _ \| '_ \| '_ \ / _ \ '__|
 | (_| | | | (_| | |_) | | | | | | | (_) | |_) | |_) |  __/ |
  \__, |_|  \__,_| .__/|_| |_|_| |_|\___/| .__/| .__/ \___|_|
  |___/          |_|                     |_|   |_|
2024-08-06 02:24:34.915 [main] INFO  o.e.jetty.setuid.SetUIDListener - Opened application@72d0f2b4{HTTP/1.1, (http/1.1)}{0.0.0.0:8989}
2024-08-06 02:24:34.917 [main] INFO  o.e.jetty.setuid.SetUIDListener - Opened admin@6d2dc9d2{HTTP/1.1, (http/1.1)}{0.0.0.0:8990}
2024-08-06 02:24:34.922 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.53.v20231009; built: 2023-10-09T12:29:09.265Z; git: 27bde00a0b95a1d5bbee0eae7984f891d2d0f8c9; jvm 17.0.11+7-LTS-207
java.lang.OutOfMemoryError: Java heap space
	at com.graphhopper.storage.RAMIntDataAccess.loadExisting(RAMIntDataAccess.java:124)
	at com.graphhopper.storage.BaseGraphNodesAndEdges.loadExisting(BaseGraphNodesAndEdges.java:97)
	at com.graphhopper.storage.BaseGraph.loadExisting(BaseGraph.java:237)
	at com.graphhopper.GraphHopper.load(GraphHopper.java:1042)
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:761)
	at com.graphhopper.http.GraphHopperManaged.start(GraphHopperManaged.java:44)
	at io.dropwizard.lifecycle.JettyManaged.doStart(JettyManaged.java:27)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:423)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.Server.doStart(Server.java:387)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:52)
	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:68)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
	at io.dropwizard.cli.Cli.run(Cli.java:78)
	at io.dropwizard.Application.run(Application.java:94)
	at com.graphhopper.application.GraphHopperApplication.main(GraphHopperApplication.java:38)

I am runnning in machine of 30GB

Something is wrong. What is the config file and the Graphhopper version you are using.

@karussell config file is same as attached above using version 9.1jar

attaching the same below

graphhopper:

  # OpenStreetMap input file PBF or XML, can be changed via command line -Ddw.graphhopper.datareader.file=some.pbf
  datareader.file: "planet-latest.osm.pbf"
  # Local folder used by graphhopper to store its data
  graph.location: graph-cache
  graph.dataaccess.default_type: MMAP


  ##### Routing Profiles ####

  # Routing can be done only for profiles listed below. For more information about profiles and custom profiles have a
  # look into the documentation at docs/core/profiles.md or the examples under web/src/test/java/com/graphhopper/application/resources/
  # or the CustomWeighting class for the raw details.
  #
  # In general a profile consists of the following
  # - name (required): a unique string identifier for the profile
  # - weighting (optional): by default 'custom'
  # - turn_costs (optional):
  #     vehicle_types: [motorcar, motor_vehicle] (vehicle types used for vehicle-specific turn restrictions)
  #     u_turn_costs: 60 (time-penalty for doing a u-turn in seconds)
  #
  # Depending on the above fields there are other properties that can be used, e.g.
  # - custom_model_files: when you specified "weighting: custom" you need to set one or more json files which are searched in
  #   custom_models.directory or the working directory that defines the custom_model. If you want an empty model you can
  #   set "custom_model_files: []
  #   You can also use the `custom_model` field instead and specify your custom model in the profile directly.
  #
  # To prevent long running routing queries you should usually enable either speed or hybrid mode for all the given
  # profiles (see below). Or at least limit the number of `routing.max_visited_nodes`.

  profiles:
   - name: car
#     turn_costs:
#       vehicle_types: [motorcar, motor_vehicle]
#       u_turn_costs: 60
     custom_model_files: [car.json]

#   You can use the following in-built profiles. After you start GraphHopper it will print which encoded values you'll have to add to graph.encoded_values in this config file.
#
#    - name: foot
#      custom_model_files: [foot.json, foot_elevation.json]
#
#    - name: bike
#      custom_model_files: [bike.json, bike_elevation.json]
#
#    - name: racingbike
#      custom_model_files: [racingbike.json, bike_elevation.json]
#
#    - name: mtb
#      custom_model_files: [mtb.json, bike_elevation.json]
#
#    # See the bus.json for more details.
#    - name: bus
#       turn_costs:
#         vehicle_types: [bus, motor_vehicle]
#         u_turn_costs: 60
#      custom_model_files: [bus.json]
#
#   Other custom models not listed here are: car4wd.json, motorcycle.json, truck.json or cargo-bike.json. You might need to modify and test them before production usage.
#   See ./core/src/main/resources/com/graphhopper/custom_models and let us know if you customize them, improve them or create new onces!
#   Also there is the curvature.json custom model which might be useful for a motorcyle profile or the opposite for a truck profile.
#   Then specify a folder where to find your own custom model files:
#  custom_models.directory: custom_models


  # Speed mode:
  # It's possible to speed up routing by doing a special graph preparation (Contraction Hierarchies, CH). This requires
  # more RAM/disk space for holding the prepared graph but also means less memory usage per request. Using the following
  # list you can define for which of the above routing profiles such preparation shall be performed. Note that to support
  # profiles with `turn_costs: true` a more elaborate preparation is required (longer preparation time and more memory
  # usage) and the routing will also be slower than with `turn_costs: false`.
  profiles_ch:
    - profile: car

  # Hybrid mode:
  # Similar to speed mode, the hybrid mode (Landmarks, LM) also speeds up routing by doing calculating auxiliary data
  # in advance. Its not as fast as speed mode, but more flexible.
  #
  # Advanced usage: It is possible to use the same preparation for multiple profiles which saves memory and preparation
  # time. To do this use e.g. `preparation_profile: my_other_profile` where `my_other_profile` is the name of another
  # profile for which an LM profile exists. Important: This only will give correct routing results if the weights
  # calculated for the profile are equal or larger (for every edge) than those calculated for the profile that was used
  # for the preparation (`my_other_profile`)
  profiles_lm: []


  #### Encoded Values ####

  # Add additional information to every edge. Used for path details (#1548) and custom models (docs/core/custom-models.md)
  # Default values are: road_class,road_class_link,road_environment,max_speed,road_access
  # More are: surface,smoothness,max_width,max_height,max_weight,max_weight_except,hgv,max_axle_load,max_length,
  #           hazmat,hazmat_tunnel,hazmat_water,lanes,osm_way_id,toll,track_type,mtb_rating,hike_rating,horse_rating,
  #           country,curvature,average_slope,max_slope,car_temporal_access,bike_temporal_access,foot_temporal_access
  graph.encoded_values: car_access, car_average_speed

  #### Speed, hybrid and flexible mode ####

  # To make CH preparation faster for multiple profiles you can increase the default threads if you have enough RAM.
  # Change this setting only if you know what you are doing and if the default worked for you.
  # prepare.ch.threads: 1

  # To tune the performance vs. memory usage for the hybrid mode use
  # prepare.lm.landmarks: 16

  # Make landmark preparation parallel if you have enough RAM. Change this only if you know what you are doing and if
  # the default worked for you.
  # prepare.lm.threads: 1


  #### Elevation ####

  # To populate your graph with elevation data use SRTM, default is noop (no elevation). Read more about it in docs/core/elevation.md
  # graph.elevation.provider: srtm

  # default location for cache is /tmp/srtm
  # graph.elevation.cache_dir: ./srtmprovider/

  # If you have a slow disk or plenty of RAM change the default MMAP to:
  # graph.elevation.dataaccess: RAM_STORE

  # To enable bilinear interpolation when sampling elevation at points (default uses nearest neighbor):
  # graph.elevation.interpolate: bilinear

  # Reduce ascend/descend per edge without changing the maximum slope:
  # graph.elevation.edge_smoothing: ramer
  # removes elevation fluctuations up to max_elevation (in meter) and replaces the elevation with a value based on the average slope
  # graph.elevation.edge_smoothing.ramer.max_elevation: 5
  # Using an averaging approach for smoothing will reveal values not affected by outliers and realistic slopes and total altitude values (up and down)
  # graph.elevation.edge_smoothing: moving_average
  # window size in meter along a way used for averaging a node's elevation
  # graph.elevation.edge_smoothing.moving_average.window_size: 150


  # To increase elevation profile resolution, use the following two parameters to tune the extra resolution you need
  # against the additional storage space used for edge geometries. You should enable bilinear interpolation when using
  # these features (see #1953 for details).
  # - first, set the distance (in meters) at which elevation samples should be taken on long edges
  # graph.elevation.long_edge_sampling_distance: 60
  # - second, set the elevation tolerance (in meters) to use when simplifying polylines since the default ignores
  #   elevation and will remove the extra points that long edge sampling added
  # graph.elevation.way_point_max_distance: 10


  #### Country-dependent defaults for max speeds ####

  # This features sets a maximum speed in 'max_speed' encoded value if no maxspeed tag was found. It is country-dependent
  # and based on several rules. See https://github.com/westnordost/osm-legal-default-speeds
  # To use it uncomment the following, then enable urban density below and add 'country' to graph.encoded_values
  # max_speed_calculator.enabled: true


  #### Urban density (built-up areas) ####

  # This feature allows classifying roads into 'rural', 'residential' and 'city' areas (encoded value 'urban_density')
  # Use 1 or more threads to enable the feature
  # graph.urban_density.threads: 8
  # Use higher/lower sensitivities if too little/many roads fall into the according categories.
  # Using smaller radii will speed up the classification, but only change these values if you know what you are doing.
  # If you do not need the (rather slow) city classification set city_radius to zero.
  # graph.urban_density.residential_radius: 400
  # graph.urban_density.residential_sensitivity: 6000
  # graph.urban_density.city_radius: 1500
  # graph.urban_density.city_sensitivity: 1000


  #### Subnetworks ####

  # In many cases the road network consists of independent components without any routes going in between. In
  # the most simple case you can imagine an island without a bridge or ferry connection. The following parameter
  # allows setting a minimum size (number of edges) for such detached components. This can be used to reduce the number
  # of cases where a connection between locations might not be found.
  prepare.min_network_size: 200
  prepare.subnetworks.threads: 1

  #### Routing ####

  # You can define the maximum visited nodes when routing. This may result in not found connections if there is no
  # connection between two points within the given visited nodes. The default is Integer.MAX_VALUE. Useful for flexibility mode
  # routing.max_visited_nodes: 1000000

  # The maximum time in milliseconds after which a routing request will be aborted. This has some routing algorithm
  # specific caveats, but generally it should allow the prevention of long-running requests. The default is Long.MAX_VALUE
  # routing.timeout_ms: 300000

  # Control how many active landmarks are picked per default, this can improve query performance
  # routing.lm.active_landmarks: 4

  # You can limit the max distance between two consecutive waypoints of flexible routing requests to be less or equal
  # the given distance in meter. Default is set to 1000km.
  routing.non_ch.max_waypoint_distance: 1000000


  #### Storage ####

  # Excludes certain types of highways during the OSM import to speed up the process and reduce the size of the graph.
  # A typical application is excluding 'footway','cycleway','path' and maybe 'pedestrian' and 'track' highways for
  # motorized vehicles. This leads to a smaller and less dense graph, because there are fewer ways (obviously),
  # but also because there are fewer crossings between highways (=junctions).
  # Another typical example is excluding 'motorway', 'trunk' and maybe 'primary' highways for bicycle or pedestrian routing.
  import.osm.ignored_highways: footway,cycleway,path,pedestrian,steps # typically useful for motorized-only routing
  # import.osm.ignored_highways: motorway,trunk # typically useful for non-motorized routing

  # configure the memory access, use RAM_STORE for well equipped servers (default and recommended)
  graph.dataaccess.default_type: RAM_STORE

  # will write way names in the preferred language (language code as defined in ISO 639-1 or ISO 639-2):
  # datareader.preferred_language: en

  #### Custom Areas ####

  # GraphHopper reads GeoJSON polygon files including their properties from this directory and makes them available
  # to all tag parsers and custom models. All GeoJSON Features require to have the "id" property.
  # Country borders are included automatically (see countries.geojson).
  # custom_areas.directory: path/to/custom_areas


  #### Country Rules ####

  # GraphHopper applies country-specific routing rules during import (not enabled by default).
  # You need to redo the import for changes to take effect.
  # country_rules.enabled: true

# Dropwizard server configuration
server:
  application_connectors:
  - type: http
    port: 8989
    # for security reasons bind to localhost
    # bind_host: localhost
    # increase GET request limit - not necessary if /maps UI is not used or used without custom models
    max_request_header_size: 50k
  request_log:
      appenders: []
  admin_connectors:
  - type: http
    port: 8990
    # bind_host: localhost
# See https://www.dropwizard.io/en/latest/manual/core.html#logging
logging:
  appenders:
    - type: file
      time_zone: UTC
      current_log_filename: logs/graphhopper.log
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
      archive: true
      archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
      archived_file_count: 30
      never_block: true
    - type: console
      time_zone: UTC
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  loggers:
    "com.graphhopper.osm_warnings":
      level: DEBUG
      additive: false
      appenders:
        - type: file
          currentLogFilename: logs/osm_warnings.log
          archive: false
          logFormat: '[%level] %msg%n'

The problem is that graph.dataaccess.default_type is a duplicated key (IntelliJ shows this) and the last one RAM_STORE is used.

@karussell great thanks its working cool

1 Like

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