2 months ago
Hi, I'm looking for a way to identify why my Memory has suddenly doubled, my thinking is that a specific API request is the culprit that's eating up all my memory but Railway Logs don't provide a way to see what is the most frequent request or what request is consuming the most memory is this something Railway has or do I have to log this myself?
Project ID: a2988802-8b5b-4d97-9a38-351f7b47ed18
19 Replies
2 months ago
You'll have to log it yourself
Railway doesn't know what your application internally does with a given request, only the response you give
But it knows how much memory each request uses? Else how is the memory usage calculated, or is there another way?
In the logs it'd be great to have one half the logs and then one half the memory graph
2 months ago
There currently isn't a feature that allows you to go to a timestamp in the metrics from a request
2 months ago
You'll have to read it and find it yourself in the chart
Ah ok. That would be really useful if there was! The memory graph is tiny and there's no way to enlarge it so the step difference is too small compared to the logs
2 months ago
We aren't serverless; we only know the total amount of memory your application uses as a whole.
Sure, but from looking at the dashboard I can see you log the time p/hour of the memory and you log the timestamp of the logs so it just feels like this data is already there (appreciate easy for me to say on the user's side) it just needs to be put together - would be really useful from a debugging perspective as right now I'll need to use PostHog or Sentry to track inspect these logs properly and work out what's going on
2 months ago
The data is not already there, the data for memory at any point in time is always going to the total memory for your app as a whole.
hmm maybe I'm talking about something different, because I'm seeing on X axis time and on the Y axis Memory (in GB) so I'd assume you know how much memory the application has used at 3:00PM compared to 3:30PM as opposed to the application as a whole or is that not the case?

2 months ago
We can see an increase, there's no way for us to know the cause.
Yeah that's fine, I'm not asking for something to tell me what the cause is (though would be very useful 😅 ) I'm looking for a better way to see both the logs and the memory in the same context so I can literally click on say 3PM and it automatically segments those logs already so I can just export them and take a look. I suppose this is a request for better debugging UI
2 months ago
I'm sorry, but it would not make sense on our end to do that, as there would be no true correlation.
So I understand, if I'm looking to make sense of any of the service metrics e.g. memory, response times, CPU usage, public network traffic and understand why they're going UP or DOWN I would have to track it using a third party monitoring system because you don't know what's going on in my application?
Just want to make sure this is the case before I start going down that path and there's not some hidden Railway feature for this
2 months ago
Correct, we have no visibility into what your application is doing.
We are simply running your code, and reporting on the metrics it uses every second, nothing more.
Ok, totally understand.
A couple of things that would be nice to improve on the metrics after really relying on these the past couple of days to solve some internal performance issues:
The CPU and Memory have very nice dashed deploy lines so I can see what's most likely the cause of any spikes. These have the commit messages, would be nice to link it directly back to the repository/commit in GitHub.
The dashed lines don't appear on Public Network Traffic, Requests, Request Error Rate, nor Response Times. This would be really nice and consistent if they did.
Just allow me to Export the data in any of these graphs (timestamp + value). That way it makes it a lot easier to match up what's happening in other third party application exports.
Allow me to change the order of the metrics, CPU is always at the top and right now I only care about the Response Times.
2 months ago
I would strongly recommend setting up some form of observability for your application rather than relying on Railway for those specific needs (e.g. knowing how much a request consumed of resources). Sentry or Open Telemetry can be good options.