OUT OF MEMORY
arrow4986
HOBBYOP

2 months 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.

Solved

15 Replies

2 months ago

Did the deployment restart or redeploy because of a crash?


arrow4986
HOBBYOP

2 months ago

Yup, it auto-redeployed


2 months ago

Any error log on the crashed deployment?


2 months ago

maybe a mem leak


arrow4986
HOBBYOP

2 months ago

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


arrow4986
HOBBYOP

2 months ago

no new deployment


2 months ago

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


arrow4986
HOBBYOP

2 months ago

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


2 months ago

what flags did you set?


arrow4986
HOBBYOP

2 months ago

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


2 months 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.


2 months ago

keep monitoring it


arrow4986
HOBBYOP

2 months 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 months ago

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


2 months 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)


Status changed to Solved medim about 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...