Guides
Unused resources
How Shipyard decides an app, database or job is not being used, what it tells you, and what to do about it.
What this is
Everything in a workspace counts towards its limits whether or not anyone uses it. The Unused resources page (in the sidebar, next to Usage) lists the apps, databases and jobs that nothing appears to be using, so you can pause or delete what you no longer need.
How "unused" is decided
- An app environment is unused after 30 days in which it neither answered requests successfully (at least 3 in a day) nor had a busy container (5% of a CPU core at its busiest). Requests that fail — status 400 and above — do not count, because that is what automated scanners on the internet mostly produce. A deploy also counts as a sign of life.
- Only environments with something deployed are considered. An empty environment is never listed.
- A database is unused after 30 days in which no client was connected over the network and its activity counter did not move. It is sampled every minute.
- A job is unused when it has not run, on a schedule or by hand, for 30 days.
- Paused apps and stopped databases are listed separately once they have been left that way for 30 days. They use no memory but keep their place in your limits and their data on disk.
Apps that answer no requests
A separate list shows apps that were called at least 20 times in the last 7 days and answered none of it successfully. For a web app or an API that usually means it is broken: open it and read its logs.
What you can do with each one
- Pause (apps) or Stop (databases): the container stops, nothing is deleted, and you can resume at any time.
- Open: go to the resource’s own page. Deleting is done there, where you are shown what will be removed and offered a copy first.
- Keep: say it is needed. It leaves the list and the email for 90 days; add a reason so the rest of your team knows why. You can undo this under “Kept”.
The email
- Workspace owners may be emailed about once a month with the same list. Anything you have marked Keep is left out, and a workspace with nothing unused gets no email.
With the API
curl -s -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/usage/idle"Each item has kind (app, database or job), reason (idle, paused or failing), resourceId (the environment id for an app), since and idleDays, and kept when someone has chosen to keep it.
curl -s -X POST -H "Authorization: Bearer $SHIPYARD_TOKEN" -H "Content-Type: application/json" -d '{"kind":"app","resourceId":"<environmentId>","reason":"background worker"}' "$SHIPYARD_API/tenants/<tenantId>/usage/idle/keep"
curl -s -X DELETE -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/usage/idle/keep/app/<environmentId>"
