What operating system is my Railway server running?
I'm looking into how to increase the JVM heap size.
15 Replies
Project ID:
59529c94-83a4-4029-89c7-3ac4d98ea51b
59529c94-83a4-4029-89c7-3ac4d98ea51b
It depends on how you're building your container image- are you using the default Nixpacks builder?
If I remember correctly, the containers are Debian/Ubuntu based but I could be wrong
If so, it's Ubuntu
Yes, I'm deploying my Java17 code directly from GitHub.
But do you have a Dockerfile?
No.
Solution
Then Ubuntu.
You can use the JAVA_OPTS environment variable to set JVM options.
Thanks! Is that in the docs somewhere? I've never used that before.
Yep - take a look at https://nixpacks.com/docs/providers/java#start
Java | Nixpacks
App source + Nix packages + Docker = Image
So it looks like I need to add
set JAVA_OPTS=%JAVA_OPTS% -Xmx8m
in some env variable?Ooops, did that close the thread?
No
Looks like something you add to
railway.toml
?Nope, just put
JAVA_OPTS=-Xmx8m
in your service's Variables tab.
I mean, you can use railway.toml
, but the web interface is often easier