OUT OF MEMORY
arrow4986
HOBBYOP

3 hours ago

Please help me!!

I'm running a simple app with just a Spring Boot backend and MySQL. The site has been live for about 5 days.

Tonight, I've been getting spammed with emails saying my backend service is out of memory (7-8 times in 5 hours). I checked the frontend, backend, and DB logs but found absolutely nothing. The only thing in the logs is the backend restarting at the exact time Railway emailed me.

Because of this, I have no idea what's going on.

15 Replies

3 hours ago

Did the deployment restart or redeploy because of a crash?


arrow4986
HOBBYOP

3 hours ago

Yup, it auto-redeployed


3 hours ago

Any error log on the crashed deployment?


3 hours ago

maybe a mem leak


arrow4986
HOBBYOP

3 hours ago

wait, it is still in the same deployment. But the server gets restarted


arrow4986
HOBBYOP

3 hours ago

no new deployment


3 hours ago

are metrics looking fine? do you have any JVM flags set?


arrow4986
HOBBYOP

3 hours ago

Thank you very much. I'm new to JVM and didnt set any JVM flags. After I did that, the metrics look fine.


3 hours ago

what flags did you set?


arrow4986
HOBBYOP

3 hours ago

During the issue, memory reached and stayed at 1000MB, after I set the flag -Xmx512m, it is stable at ~400MB


3 hours ago

That's a tight utilization if before setting the flags it used 1GB, if your app has a mem leak it will hit it quicker than before.


3 hours ago

keep monitoring it


arrow4986
HOBBYOP

2 hours ago

Right now, I have 0 active users, but I'm expecting about 300 active users after branding. What kind of limit do you think I should set?


arrow4986
HOBBYOP

2 hours ago

I think there are a few other things at play here. Let me look into my system first


2 hours ago

Yep, it's a bit more complicated than just setting the min/max mem, if you have a mem leak it will still eventually crash (and charge for the used mem)


Welcome!

Sign in to your Railway account to join the conversation.

Loading...