0

I am using GTFS data from https://opentransportdata.swiss/de/dataset/timetable-2023-gtfs2020 (this file) and OSM from https://download.geofabrik.de/europe/ (this file).

I tried it on my low specs computer first, then tried to on a 64GB RAM + 50 GB SWAP machine in a rocker/geospatial docker.

rJava::.jinit()
rJava::.jcall("java.lang.System", "S", "getProperty", "java.version")
# "11.0.18"
## restarting R session here solved my issue ##
options(java.parameters = "-Xmx50G")
library(r5r)
library(sf)
library(data.table)
library(ggplot2)
r5r_core <- setup_r5(data_path = "/switzerlandR", temp_dir = T, verbose = T)
[...]
2023-06-04 21:45:12,333 [main] DEBUG c.c.r.l.LevelOfTrafficStressLabeler - Unable to parse maxspeed tag signals
2023-06-04 21:45:12,333 [main] DEBUG c.c.r.l.LevelOfTrafficStressLabeler - Unable to parse maxspeed tag signals
2023-06-04 21:45:12,574 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,574 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,574 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,574 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,574 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,621 [main] DEBUG c.c.r.l.TraversalPermissionLabeler - Unknown access tag:permit
2023-06-04 21:45:12,622 [main] DEBUG c.c.r.l.TraversalPermissionLabeler - Unknown access tag:permit
2023-06-04 21:45:12,674 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
2023-06-04 21:45:12,674 [main] DEBUG c.c.r.s.StreetLayer - Way has no permissions skipping!
Error in setup_r5(data_path = "/switzerlandR", temp_dir = T, verbose = T) : 
  java.lang.OutOfMemoryError: Java heap space

What could be the issue? What could I try?

Martin
  • 1,141
  • 14
  • 24
  • 1
    If you add `-XshowSettings:vm` to your `jvm.parameters`, what `Max. Heap Size` does it report? – tgdavies Jun 04 '23 at 22:16
  • You're right, the memory was not allocated. I had to restart my R session and set the option first. ``` rJava::.jinit() rJava::.jcall("java.lang.System", "S", "getProperty", "java.version") # after this restart R session! options(java.parameters = "-Xmx50G") ``` Then it worked. Thanks and sorry for the noob mistake. – Martin Jun 04 '23 at 23:07
  • if you use 50GB heap in a 64GB system you may be experiencing other memory issues because of not leaving enough memory for the rest of native memory Java uses plus the rest of the system. – aled Jun 05 '23 at 03:23

0 Answers0