Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.
If a container fails, Magic Containers restarts it automatically. You do not configure this behavior. The platform detects the failure in a few seconds.
The application writes more than 10 GB to ephemeral storage, so the platform evicts the pod.
Exit codes 137 and 143 are an exception. They show that the process stopped after a stop signal, for example during a graceful shutdown. The platform treats these as an intentional stop, and not as a failure.
Each pod has a deadline for the restarts. The default deadline is different for a pod with a persistent volume. When the deadline expires, the platform stops the attempts, and it removes the pod.
While the platform restarts the container, the application status stays Processing. Open the region, and then the pod, to read the error message and the live logs. For the steps, refer to Troubleshooting.Correct the cause, and then deploy the new image or configuration. The platform creates new pods, and the restarts start again from the first attempt.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"bunny.net Documentation","colors":{"primary":"#EF6126","light":"#EF6126","dark":"#EF6126"},"logo":{"light":"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-dark.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=62c091ea1aaea93d0a981902b7783e37","dark":"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-light.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=3610e32d68a9fa458b0116ac58ca812a"},"favicon":"https://mintcdn.com/bunnynet-cb9733c2/1bTPx1eyQm8EK8W3/favicon.png?fit=max\u0026auto=format\u0026n=1bTPx1eyQm8EK8W3\u0026q=85\u0026s=85267b63e804fac7a4dd94599bb8c6e8","navbar":{"links":[{"href":"https://bunny.net/docs/api-reference","label":"API Reference"},{"href":"https://github.com/BunnyWay","label":"GitHub"}],"primary":{"type":"button","label":"Get Started","href":"https://dash.bunny.net/auth/register"}},"footer":{"socials":{"discord":"https://discord.gg/bunnynet","github":"https://github.com/BunnyWay","x":"https://x.com/BunnyCDN","bluesky":"https://bsky.app/profile/bunny.net","linkedin":"https://www.linkedin.com/company/bunnynet","facebook":"https://www.facebook.com/bunnycdn"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","claude","chatgpt","cursor","view","vscode"],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bunnynet-cb9733c2","hasAudioNarration":false,"actualSubdomain":"bunnynet-cb9733c2","customDomains":["bunny.net"],"gitSource":{"type":"github","owner":"bunnyway","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae49f2d21d44d6b52dcfe35","collectionId":"5e262b87-ade9-45d8-9b63-06888c8d59a3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae49f2d21d44d6b52dcfe35"},"feedback":{"thumbs":true,"contextualFeedback":{"allowEmail":true},"agentFeedback":true,"edits":true,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae534f2b9a26f131eb41834","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Documentation","count":752},{"language":"default","tag":"API Reference","count":318},{"language":"default","tag":"Core Platform API","count":109},{"language":"default","tag":"CDN","count":82},{"language":"default","tag":"Shield API","count":66},{"language":"default","tag":"Stream","count":66},{"language":"default","tag":"Magic Containers API","count":56},{"language":"default","tag":"Storage","count":54},{"language":"default","tag":"Guides","count":54},{"language":"default","tag":"Reference","count":52}],"searchSettings":{"isFiltersEnabled":true}},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"type":"link","email":"support@bunny.net","url":"https://bunny.net/contact","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark img[src*=\"/logo/frameworks/angular.svg\"],.dark img[src*=\"/logo/frameworks/eleventy.svg\"],.dark img[src*=\"/logo/frameworks/express.svg\"],.dark img[src*=\"/logo/frameworks/mariadb.svg\"],.dark img[src*=\"/logo/frameworks/nextjs.svg\"],.dark img[src*=\"/logo/frameworks/sphinx.svg\"]{filter:invert(1)}html:not(.dark) img[src*=\"/logo/frameworks/zola.svg\"]{filter:invert(1)}"}],"page":{"pagePath":"magic-containers/restart-policy","slug":"/magic-containers/restart-policy","pageMetadata":{"title":"Restart Policy","description":"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.","href":"/magic-containers/restart-policy"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Info,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If a container fails, Magic Containers restarts it automatically. You do not configure this behavior. The platform detects the failure in a few seconds.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-counts-as-a-failure`,children:`What counts as a failure`}),`\n`,_jsx(_components.p,{children:`The platform restarts the container in these cases:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The main process exits with a non-zero exit code.`}),`\n`,_jsxs(_components.li,{children:[`The application uses more memory than the `,_jsx(_components.a,{href:`/magic-containers/limits`,children:`instance limit`}),`, so the platform stops it (out of memory).`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.a,{href:`/magic-containers/health-checks`,children:`startup or liveness health check`}),` fails as many times as its failure threshold.`]}),`\n`,_jsxs(_components.li,{children:[`The application writes more than 10 GB to `,_jsx(_components.a,{href:`/magic-containers/limits`,children:`ephemeral storage`}),`, so the platform evicts the pod.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Exit codes 137 and 143 are an exception. They show that the process stopped after a stop signal, for example during a `,_jsx(_components.a,{href:`/magic-containers/graceful-shutdown`,children:`graceful shutdown`}),`. The platform treats these as an intentional stop, and not as a failure.`]}),`\n`,_jsx(Heading,{level:`2`,id:`delay-between-the-attempts`,children:`Delay between the attempts`}),`\n`,_jsx(_components.p,{children:`The platform waits a few seconds before each restart. The delay grows with each attempt:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Attempt`}),_jsx(_components.th,{children:`Delay`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`About 6 s`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{children:`About 10 s`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`10`}),_jsx(_components.td,{children:`About 16 s`})]})]})]}),`\n`,_jsx(_components.p,{children:`The delay increases by approximately one second per attempt. It does not double.`}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`A container that fails again and again therefore restarts quickly. The platform makes no long pause between the attempts.`})}),`\n`,_jsx(Heading,{level:`2`,id:`when-the-platform-stops-the-attempts`,children:`When the platform stops the attempts`}),`\n`,_jsx(_components.p,{children:`Each pod has a deadline for the restarts. The default deadline is different for a pod with a persistent volume. When the deadline expires, the platform stops the attempts, and it removes the pod.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-correct-a-restart-loop`,children:`How to correct a restart loop`}),`\n`,_jsxs(_components.p,{children:[`While the platform restarts the container, the application status stays `,_jsx(_components.strong,{children:`Processing`}),`. Open the region, and then the pod, to read the error message and the live logs. For the steps, refer to `,_jsx(_components.a,{href:`/magic-containers/troubleshooting`,children:`Troubleshooting`}),`.`]}),`\n`,_jsx(_components.p,{children:`Correct the cause, and then deploy the new image or configuration. The platform creates new pods, and the restarts start again from the first attempt.`}),`\n`,_jsx(Heading,{level:`2`,id:`effect-on-your-data`,children:`Effect on your data`}),`\n`,_jsxs(_components.p,{children:[`A restart gives the container a new, empty file system. Files in ephemeral storage are lost. Data on a `,_jsx(_components.a,{href:`/magic-containers/persistent-volumes`,children:`persistent volume`}),` stays available.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Restart Policy","description":"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.","href":"/magic-containers/restart-policy"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What counts as a failure","slug":"what-counts-as-a-failure","depth":2,"children":[]},{"title":"Delay between the attempts","slug":"delay-between-the-attempts","depth":2,"children":[]},{"title":"When the platform stops the attempts","slug":"when-the-platform-stops-the-attempts","depth":2,"children":[]},{"title":"How to correct a restart loop","slug":"how-to-correct-a-restart-loop","depth":2,"children":[]},{"title":"Effect on your data","slug":"effect-on-your-data","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"bunnynet-cb9733c2","siteName":"bunny.net Documentation","title":"Restart Policy - bunny.net Documentation","relatedPagesConfig":{"enabled":false,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-08T08:50:49.086Z","gitLastModified":"2026-09-08T08:50:09.000Z","originalFileLocation":"magic-containers/restart-policy.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\">\u003cmeta data-mint-head name=\"application-name\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Restart Policy - bunny.net Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://bunny.net/docs/magic-containers/restart-policy\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bunnynet-cb9733c2.mintlify.app/_mintlify/api/og/v2?division=Platform\u0026amp;title=Restart+Policy\u0026amp;description=Understand+when+Magic+Containers+restarts+a+failed+container%2C+and+how+long+it+waits+between+the+attempts.\u0026amp;theme=3e3fa11ba94222b95e7f52d5\u0026amp;signature=a08b3e0ec7279b8757caddc288de6483acccaf914a1051307001880bbf4bf9d9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Restart Policy - bunny.net Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bunnynet-cb9733c2.mintlify.app/_mintlify/api/og/v2?division=Platform\u0026amp;title=Restart+Policy\u0026amp;description=Understand+when+Magic+Containers+restarts+a+failed+container%2C+and+how+long+it+waits+between+the+attempts.\u0026amp;theme=3e3fa11ba94222b95e7f52d5\u0026amp;signature=a08b3e0ec7279b8757caddc288de6483acccaf914a1051307001880bbf4bf9d9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/bunnynet-cb9733c2/Zv4NOenQlgPS3TXm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"bunny.net Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EF6126\">\u003clink data-mint-head rel=\"canonical\" href=\"https://bunny.net/docs/magic-containers/restart-policy\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/magic-containers/restart-policy.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://bunny.net/#organization\",\"name\":\"bunny.net Documentation\",\"url\":\"https://bunny.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bunnynet-cb9733c2/54-4KCQKoNVNuoyW/logo/bunny-logo-dark.svg?fit=max\u0026auto=format\u0026n=54-4KCQKoNVNuoyW\u0026q=85\u0026s=62c091ea1aaea93d0a981902b7783e37\"}},{\"@type\":\"WebSite\",\"@id\":\"https://bunny.net/docs#website\",\"name\":\"bunny.net Documentation\",\"url\":\"https://bunny.net/docs\",\"publisher\":{\"@id\":\"https://bunny.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://bunny.net/docs/magic-containers/restart-policy#webpage\",\"url\":\"https://bunny.net/docs/magic-containers/restart-policy\",\"name\":\"Restart Policy\",\"description\":\"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\",\"dateModified\":\"2026-09-08T08:50:09.000Z\",\"isPartOf\":{\"@id\":\"https://bunny.net/docs#website\"},\"breadcrumb\":{\"@id\":\"https://bunny.net/docs/magic-containers/restart-policy#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://bunny.net/docs/magic-containers/restart-policy#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://bunny.net/docs/magic-containers/autoscaling\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Restart Policy\",\"item\":\"https://bunny.net/docs/magic-containers/restart-policy\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://bunny.net/docs/magic-containers/restart-policy#article\",\"headline\":\"Restart Policy\",\"name\":\"Restart Policy\",\"description\":\"Understand when Magic Containers restarts a failed container, and how long it waits between the attempts.\",\"url\":\"https://bunny.net/docs/magic-containers/restart-policy\",\"mainEntityOfPage\":{\"@id\":\"https://bunny.net/docs/magic-containers/restart-policy#webpage\"},\"dateModified\":\"2026-09-08T08:50:09.000Z\",\"publisher\":{\"@id\":\"https://bunny.net/#organization\"},\"isPartOf\":{\"@id\":\"https://bunny.net/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"bunny.net Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"bunny.net Documentation","nav":{"global":null,"products":[{"product":"Home","icon":"book-open","pages":[{"title":"Home","href":""}]},{"product":"CDN","icon":"zap","description":"Accelerate and protect your content globally","pages":[{"title":"CDN","href":"/cdn"}]},{"product":"Magic Containers","icon":"box","description":"Deploy any app anywhere with Docker","tabs":[{"tab":"Documentation","groups":[{"group":"Documentation","pages":[{"title":"Magic Containers","sidebarTitle":"Introduction","mode":"wide","href":"/magic-containers"},{"title":"Quickstart","href":"/magic-containers/quickstart"},{"title":"Templates","href":"/magic-containers/templates"},{"group":"Use Cases","hidden":true,"pages":[{"title":"Gaming as a service","href":"/magic-containers/gaming"},{"title":"AI Training","href":"/magic-containers/ai-training"},{"title":"Image optimizer","href":"/magic-containers/image-optimizer"}]},{"title":"Pricing","href":"/magic-containers/pricing"},{"title":"Magic Containers Changelog","sidebarTitle":"Changelog","url":"/changelog?tags=Magic%20Containers","href":"/magic-containers/changelog"}]},{"group":"Deployment","pages":[{"title":"Deploy an App","sidebarTitle":"Deploy","href":"/magic-containers/deploy"},{"title":"Deploy with GitHub Actions","href":"/magic-containers/deploy-with-github-actions"},{"title":"Image Registries","href":"/magic-containers/image-registries"},{"title":"Regions","href":"/magic-containers/regions"},{"title":"IP Addresses","href":"/magic-containers/ip-addresses"},{"group":"Bunny Container Registry","hidden":true,"pages":[{"title":"Bunny Container Registry","tag":"Preview","href":"/magic-containers/bunny-container-registry"}]}]},{"group":"Managing Apps","pages":[{"title":"Update App","href":"/magic-containers/update"},{"title":"Configuration","href":"/magic-containers/configuration"},{"title":"Environment Variables","href":"/magic-containers/environment-variables"},{"title":"Persistent Volumes","tag":"Beta","href":"/magic-containers/persistent-volumes"},{"title":"Endpoints","href":"/magic-containers/endpoints"},{"title":"Undeploy","href":"/magic-containers/undeploy"},{"title":"Delete App","href":"/magic-containers/delete"}]},{"group":"Observability","pages":[{"title":"Monitoring","href":"/magic-containers/monitoring"},{"title":"Logs","href":"/magic-containers/logs"},{"title":"Log Forwarding","href":"/magic-containers/log-forwarding"},{"title":"Health Checks","href":"/magic-containers/health-checks"}]},{"group":"Platform","pages":[{"title":"Autoscaling","href":"/magic-containers/autoscaling"},{"title":"Rolling Updates","href":"/magic-containers/rolling-updates"},{"title":"Blue/Green \u0026 A/B Deployments","href":"/magic-containers/deployment-strategies"},{"title":"Graceful Shutdown","description":"Understand how Magic Containers handles container shutdown with SIGTERM signals and grace periods.","href":"/magic-containers/graceful-shutdown"},{"title":"Restart Policy","href":"/magic-containers/restart-policy"},{"title":"Sandboxing","description":"Learn how Magic Containers uses gVisor for application kernel isolation and enhanced container security.","href":"/magic-containers/sandbox"},{"title":"Multi-Container Apps","href":"/magic-containers/multi-container"},{"title":"App Metadata","href":"/magic-containers/app-metadata"}]},{"group":"Reference","pages":[{"title":"Limits","href":"/magic-containers/limits"},{"title":"Troubleshooting","href":"/magic-containers/troubleshooting"},{"title":"FAQs","href":"/magic-containers/faqs"},{"title":"API Reference","url":"/api-reference/magic-containers","href":"/magic-containers/api-reference"}]},{"group":"Guides","pages":[{"group":"Go","pages":[{"title":"Go API","href":"/magic-containers/guides/simple-go-api"}]},{"group":"Node.js","pages":[{"title":"Node.js API with Hono","href":"/magic-containers/guides/node-hono-api"},{"title":"Node.js API with Express","href":"/magic-containers/guides/node-express-api"}]},{"group":"PHP","pages":[{"title":"PHP API with Slim","href":"/magic-containers/guides/php-slim"}]},{"group":"Python","pages":[{"title":"Python API with FastAPI","href":"/magic-containers/guides/python-fastapi"}]},{"group":"Web Frameworks","pages":[{"title":"Astro","href":"/magic-containers/guides/astro"},{"title":"Next.js","href":"/magic-containers/guides/nextjs"},{"title":"Nuxt","href":"/magic-containers/guides/nuxt"},{"title":"Ruby on Rails","href":"/magic-containers/guides/ruby-on-rails"},{"title":"Laravel + MariaDB","href":"/magic-containers/guides/laravel"}]},{"group":"Apps","pages":[{"title":"WordPress","href":"/magic-containers/guides/wordpress"}]},{"group":"Databases","pages":[{"title":"ClickHouse","href":"/magic-containers/guides/clickhouse"},{"title":"MariaDB","href":"/magic-containers/guides/mariadb"},{"title":"PostgreSQL","href":"/magic-containers/guides/postgresql"},{"title":"Redis","href":"/magic-containers/guides/redis"}]}]}]}]},{"product":"Edge Scripting","icon":"code","description":"Deploy serverless code at the edge","pages":[{"title":"Edge Scripting","href":"/scripting"}]},{"product":"Stream","icon":"video","description":"Video streaming and delivery platform","pages":[{"title":"Stream","href":"/stream"}]},{"product":"Storage","icon":"hard-drive","description":"Global object storage","pages":[{"title":"Storage","href":"/storage"}]},{"product":"Shield","icon":"shield","description":"Stay protected and online no matter what","pages":[{"title":"Shield","href":"/shield"}]},{"product":"Optimizer","icon":"sparkles","description":"Automatic image and web optimization.","pages":[{"title":"Optimizer","href":"/optimizer"}]},{"product":"DNS","icon":"globe","description":"Unlock the true power of DNS with an ultra-fast scriptable platform","pages":[{"title":"DNS","href":"/dns"}]},{"product":"Database","icon":"database","description":"Serverless SQLite over HTTP","pages":[{"title":"Database","href":"/database"}]},{"product":"Integrations","icon":"puzzle","description":"Official and third-party plugins and integrations","pages":[{"title":"Integrations","href":"/integrations/wordpress"}]},{"product":"CLI","icon":"terminal","description":"Manage bunny.net from your terminal","pages":[{"title":"CLI","href":"/cli"}]},{"product":"API Reference","icon":"square-terminal","description":"Build \u0026 Integrate with the Platform API","pages":[{"title":"API Reference","href":"/api-reference"}]},{"product":"Partners","icon":"handshake","description":"Manage customers, pricing, and billing as a bunny.net partner","pages":[{"title":"Partners","href":"/partners"}]}]},"basePath":"","title":"Restart Policy - bunny.net Documentation","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":[],"chunks":[]}