TL;DR: A free container is active when real HTTP requests reach your app and get a response; health checks and open WebSockets do not count. After 15 idle minutes it sleeps, which feels like 15 to 20 in practice, and the next request wakes it in about a minute. What sleeping does to your app, how the 100 free hours are counted, and why pinging a container awake is the most expensive thing you can do with it.
"My container went to sleep" is the support question we get most, usually followed by "but I was just using it". This post explains how auto-sleep behaves from where you sit: what counts as traffic, when a container is considered idle, what sleeping and waking actually do to your app, how the 100 free hours are counted, and why keeping a free container awake with a ping is the most expensive thing you can do with it.
What counts as traffic
A container is active when real HTTP requests reach your application and get a response.…