PageSourceSearch

https://devpod.sh/docs/assets/js/62866837.f532c0fe.js

js devpod.sh collected 2026-09-25 14:36:08 UTC 5,582 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdevpod_docs=self.webpackChunkdevpod_docs||[]).push([[6137],{2387:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var o=i(4848),n=i(8453);const s={title:"Auto-Inactivity Timeout",sidebar_label:"Auto-Inactivity Timeout"},r=void 0,a={id:"developing-in-workspaces/inactivity-timeout",title:"Auto-Inactivity Timeout",description:"By default, most providers are able to automatically shutdown unused workspaces to save costs. For example, for cloud providers such as AWS, Azure and Google Cloud, DevPod will automatically stop the machine to save costs when workspaces are not used.",source:"@site/pages/developing-in-workspaces/inactivity-timeout.mdx",sourceDirName:"developing-in-workspaces",slug:"/developing-in-workspaces/inactivity-timeout",permalink:"/docs/developing-in-workspaces/inactivity-timeout",draft:!1,unlisted:!1,editUrl:"https://github.com/loft-sh/devpod/edit/main/docs/pages/developing-in-workspaces/inactivity-timeout.mdx",tags:[],version:"current",frontMatter:{title:"Auto-Inactivity Timeout",sidebar_label:"Auto-Inactivity Timeout"},sidebar:"adminSidebar",previous:{title:"Reuse local credentials",permalink:"/docs/developing-in-workspaces/credentials"},next:{title:"Stop a Workspace",permalink:"/docs/developing-in-workspaces/stop-a-workspace"}},d={},c=[{value:"Configuring the timeout",id:"configuring-the-timeout",level:2},{value:"How does it work?",id:"how-does-it-work",level:2},{value:"Non-Machine Providers",id:"non-machine-providers",level:3},{value:"Machine Providers",id:"machine-providers",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"By default, most providers are able to automatically shutdown unused workspaces to save costs. For example, for cloud providers such as AWS, Azure and Google Cloud, DevPod will automatically stop the machine to save costs when workspaces are not used."}),"\n",(0,o.jsxs)(t.p,{children:["Machines stopped this way preserve the data and state, so when a workspace ",(0,o.jsx)(t.a,{href:"/docs/developing-in-workspaces/connect-to-a-workspace",children:"is started again"}),", DevPod will simply restart the machine and the workspace."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsx)(t.p,{children:"All official DevPod providers offer this pre-configured to 5-10 minutes. Check the provider options to see how to change the timeout."})}),"\n",(0,o.jsx)(t.h2,{id:"configuring-the-timeout",children:"Configuring the timeout"}),"\n",(0,o.jsxs)(t.p,{children:["Changing the default setting for inactivity timeout can be done by ",(0,o.jsx)(t.a,{href:"/docs/managing-providers/add-provider#set-provider-options",children:"configuring the provider options"}),". Typically there is an option called ",(0,o.jsx)(t.code,{children:"INACTIVITY_TIMEOUT"})," that controls this behaviour."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["More info about the provider's auto-shutdown can be found in the ",(0,o.jsx)(t.a,{href:"/docs/developing-providers/agent#machine-providers",children:"agent's development guide"}),"\nThat will explain how this is done and what can be configured."]})}),"\n",(0,o.jsx)(t.h2,{id:"how-does-it-work",children:"How does it work?"}),"\n",(0,o.jsx)(t.h3,{id:"non-machine-providers",children:"Non-Machine Providers"}),"\n",(0,o.jsx)(t.p,{children:"For non-machine providers, DevPod can automatically kill the container its running in by terminating the process with pid 1. This is useful for providers such as docker, kubernetes or ssh, where you don't want the container to be running if its not needed. If configured on the provider, DevPod will start a process within the container to keep track of activity and then kill itself when the user hasn't connected for the given duration. This will not erase any state within the container and instead only stop it. Then when the user wants to start working with the workspace again, DevPod will restart the container again."}),"\n",(0,o.jsx)(t.h3,{id:"machine-providers",children:"Machine Providers"}),"\n",(0,o.jsx)(t.p,{children:"For machine providers, killing just the container within the remote machine is typically not enough as VMs still generate costs even if they are unused.\nInstead, DevPod will install itself as a Daemon into the remote VM and track the activity from there. If there wasn't activity for a given amount of time, DevPod will automatically shutdown the machine or even delete it, based on what's cheaper for the given cloud provider.\nThen when the developer wants to resume development, DevPod will restart or recreate the virtual machine."}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"/docs/developing-providers/agent#machine-providers",children:"agent's development guide"}
1)," to learn more about how inactivity-timeout works on the provider side."]})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,t,i)=>{i.d(t,{R:()=>r,x:()=>a});var o=i(6540);const n={},s=o.createContext(n);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.