How to change JVM max heap size
recrutaaeasy
HOBBYOP
a year ago
Hello! I searched a little bit around the station but couldn't find anything about it. How could I change the max heap size of my API's JVM? I was guessing I could use the Railway CLI to connect through the ssh and change it manually, but is there an easier way? My max heap size is 2GB but my app is consuming roughly 400 to 500mb, so I wanted to decrease it to put the GC to work.
1 Replies
brody
EMPLOYEE
10 months ago
Hello,
Since this wouldn't relate to the Railway platform itself, have you tried searching sites like Stack Overflow? -
https://stackoverflow.com/a/17613621
You would set _JAVA_OPTIONS=-Xmx1g as a service variable.
Best,
Brody
Status changed to Solved brody • 11 months ago
