We had an email this morning saying that one of our apps had ran out of memory.
While investigating, I noticed a spike in HTTP response times around the time of the email.
I was looking for more information on what was happening around that time. I wanted to find application logs from around that time but didn’t find ways to do that w/ the flyctl logs command.
Is there any way we can find app logs for that specific time or any insights on what can be happening here?
It’s worth to take a look at Metrics → VM Service Concurrency graph. Chances are that you had an influx of HTTP requests that brought the app down by exhausting its memory.
If this is the case then you should tune the app by changing
soft_limit settings in
.toml file. Set them to the adequate values that your app can handle without a problem given the allocated amount of RAM.
If you want to serve traffic spikes larger than the instance limits, you should tune the autoscaling.