Service did not sleep after 7 minutes of no outbound network
There's a high chance that I'm missing something; but from what I read on the docs for Scale to Zero, a service should sleep when there's no outbound network for over 5 minutes. There is a small spike at 9:15 PM IST but after that it's all 0 B outbound.
32 Replies
Project ID:
69531a0b-78b7-4a71-9df4-3a8db9703b69
Service ID:
22a6764b-4965-47af-82f7-f87c777fb2d2
the service sleeps after 25 minutes of no outbound traffic
Damn, when was that bumped
where did you read 5 minutes?
https://blog.railway.app/p/launch-week-01-scale-to-zero#inactive-container-detection
It appears to be around 10 minutes
i get around 25 minutes for an app that just prints and waits on kill signals
I get between 5 and 10, that's weird
more tests are needed
My DB just took 8-9 minutes to sleep
yup:
Every 5 minutes it compares outbound packets and once no new packets have been sent, the container is flagged as inactive.idk where did you read 25 at max it would be 5 + 5-10 of cAdvisor
well, there's 13 minutes too
seems to be inconsistent
this is logged from an app that has no code that would ever make any kind of network request
also, jake (cooper) said 30 minutes on twitter
but as proven it is not a perfect number
uh?
yup
my deployment exists and is active
how does it not have any metrics lol
metrics aren't collected when sleeping so the graphs dont have data to show?
but it isn't sleeping
oh
it does have a deployment right?
The last metric was 9:42 PM IST
uh thats a bug
for sure
so metrics show in the 1d tab
mhm
it's either active and not showing metrics or it's sleeping but not showing that it's sleeping
Thread has been flagged to Railway team by @Brody.
strange, even if it was sleeping forever, metrics should just show zero, since thats more accurate lol
lol true
team is away right now 😦
I confirm I don't get any metrics to show when apps/databases are sleeping
Weird
I can't see them sleeping either
It doesn't seem to provide any data point to display when sleeping
imo they should seed the metrics with zeros while it sleeps
Hi All, thanks for starting and adding to this thread, was helpful while testing sleep functionality. Just want to add my experience to the record. FastAPI with ONNX model took 21 minutes to sleep. It shows up as active, but no new usage shows up in metrics, and repeatedly reloading account usage page confirms that it is not accumulating any new usage while asleep. I understand that this is a difficult feature to roll out, so props to the Railway team for finally making it a reality and looking forward to using it more when the kinks are worked out.
Once I've woken my service up, I can see the previous usage at zero on the usage tab of the service.