Service won't sleep
Project ID: 948196f9-27d3-44cd-bdd2-e50d7b67c7ef
Service ID: f690603f-d911-4602-b9f6-db5aa676591d
I enabled the "Enable App Sleeping" toggle. After 30' of no traffic it didnt sleep so I tried removing public network domain. It's still not sleeping.
Solution:Jump to solution
im seeing auto sleep times from anywhere between 15 to 30 minutes for an app that has no way of making any outbound requests
28 Replies
Project ID:
948196f9-27d3-44cd-bdd2-e50d7b67c7ef,f690603f-d911-4602-b9f6-db5aa676591d
look at the network metrics, does it have any outbound traffic?
some, yes
an active service won't be slept
ok. i dont know what generates that outbound traffic. i'll look into that
question for you, if you had a button that manually slept this service and disabled automatic wakes, would you use it right now? (with a button to also manually wake)
absolutely
i mainly intend to use sleeping for work-in-progress or staging.
i'd sleep it when not working on it.
thought so, a manual sleep and manual only wake has many usecases
cc @Mig
oh, outbound traffic is probably appsignal daemon. a monitoring service.
yep, the sleep deamon monitors any outbound traffic
i'll try disabling it
still not sleeping
it could take up to 30 minutes for the app to auto sleep
oh, ok!
Solution
im seeing auto sleep times from anywhere between 15 to 30 minutes for an app that has no way of making any outbound requests
ok! 👍 i'll wait. On reading the launch blog post I understood it was 5 minutes.
service went to sleep?
Yes. After 30minutes aprox.
I found the metrics confusing though
After an hour I was still waiting for the metrics to flatline but they actually freeze
yeah i know, id much prefer the metrics continue but get seeded with zeros, what do you think?
Exactly
thanks for the feedback @dwaynemac. The current confusion comes from containers that are still chatting even if you aren't using the service. This is something in the container OS that could be talking to external services like NTP which happens randomly.
I've mentioned to the team that we should work on improving the network visibility to help answer "what is keeping my container awake". We'll work on this.
As for the time took to sleep, the traffic usage is evaluated in 5 minute intervals but those intervals might happen before the container has reported to us its latest traffic usage (usage collection and inspection are 2 separate intervals). I expect a container to be slept no later than 15 minutes.
If we get enough feedback on the confusion regarding when containers should sleep I'll try to improve it.
thanks for the reply!
I think with app sleep you can having a staging environment that is automatically slept when you're done and started when you begin to use it.
I mean, I don't want you to have to worry about pressing a button. It should be automatic.
I'm seeing max times of around 28 minutes
though that may be flawed testing
I think I've seen it a few times too but thought I resolved it. I'd say if it's longer then 15 minutes I should definitely look into it. I'll create a ticket to mess around with it soon to confirm.
and I'll see if I can improve my testing, it's not like I know what I'm doing 🤣
nah I think checking if your container should be slept should be easy.
I'm just doing time.Now() then waiting for a interrupt signal then logging the time.Since