Zum Inhalt springen
#0981
ContainersCron

The bill is flat either way; the RAM isn't

Pause is the polite way to step away from a container: POST /api/v1/containers/{id}/pause freezes every process in about a second, keeps open files and network connections, and resumes in one or two. Sixty developers learned this, and the box's RAM filled with frozen state nobody came back for.

A stopped container costs the box nothing but disk, which cloned containers mostly share. A paused one holds its RAM. So a nightly cron lists GET /api/v1/containers, filters status === "paused" client-side since the list takes no status filter, and stops any whose updated_at is older than a day. Filesystem preserved; the developer starts it Monday and loses only the processes.

Snapshots can't be taken while paused, so the sweep also unblocks anyone who wanted one.

The bill is flat either way. The RAM isn't.