[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-28。"],[],[],null,["# Idle shutdown\n=============\n\nVertex AI Workbench instances\nshut down after a specified period of inactivity by default.\nThis page describes the idle shutdown feature and how to\nchange the default idle shutdown settings during instance creation.\n\nOverview\n--------\n\nTo help manage costs, Vertex AI Workbench instances\nshut down after being idle for a specific time period by default.\nYou can change the amount of time or turn this feature off.\n\nRequirements for running idle shutdown\n--------------------------------------\n\nFor idle shutdown to run, your Vertex AI Workbench instance\nmust have guest attributes enabled. Guest attributes are enabled by default\nbut if you've turned off guest attributes, you can enable guest attributes\nby setting the `enable-guest-attributes` metadata key to `true`. See\n[Update an instance's metadata](/vertex-ai/docs/workbench/instances/manage-metadata#update).\n\nBilling\n-------\n\nWhile your instance is shut down, there are no CPU or GPU\nusage charges except for scheduled executions that run during\nthe shutdown. For more information about scheduled executions, see\n[Scheduled executions run while instance is shut down](#executions)\non this page.\n\nDisk storage charges still apply while\nyour instance is shut down. For more information,\nsee [Pricing](/vertex-ai/pricing#notebooks).\n\nTurn off idle shutdown or change the default inactivity time period\n-------------------------------------------------------------------\n\nIdle shutdown is enabled and set to shut down your instance after\n180 inactive minutes by default.\n\nYou can change these settings when you\n[create an instance](/vertex-ai/docs/workbench/instances/create).\n\nTo turn off idle shutdown or to change the inactivity time period\non an existing instance:\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. Click the instance name.\n\n3. On the **Instance details** page, click the **Software and security** tab.\n\n4. In the **Modify software and security configuration** section:\n\n - To turn off idle shutdown, clear the check mark next to\n **Enable Idle Shutdown**.\n\n - To change the inactivity time period,\n in **Time of inactivity before shutdown (Minutes)**, change\n the number to the number of minutes of inactivity that you want.\n In the Google Cloud console, this setting\n can be set to any integer value from 10 to 1440.\n\n5. Click **Submit**.\n\nManage idle shutdown using the gcloud CLI\n-----------------------------------------\n\nIdle shutdown for Vertex AI Workbench instances is managed using\nthe `metadata` flag. To enable idle shutdown,\ncreate an instance with the `idle-timeout-seconds` key in the metadata\nwith the value set to the number of seconds. \n\n```bash\ngcloud workbench instances create INSTANCE_NAME --metadata=idle-timeout-seconds=86400\n```\n\nTo change the idle shutdown time period, update the value for the `idle-timeout-seconds` key in the metadata. \n\n```bash\ngcloud workbench instances update INSTANCE_NAME --metadata=idle-timeout-seconds=43200\n```\n\nTo turn off idle shutdown, use the following command: \n\n```bash\ngcloud workbench instances update INSTANCE_NAME --metadata=idle-timeout-seconds=\n```\n\nManage idle shutdown on Terraform\n---------------------------------\n\nIdle shutdown for workbench instances on Terraform is managed using the `idle-timeout-seconds` key in the metadata field.\n\n\u003cbr /\u003e\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\n\n\u003cbr /\u003e\n\n resource \"google_workbench_instance\" \"default\" {\n name = \"workbench-instance-example\"\n location = \"us-central1-a\"\n\n gce_setup {\n machine_type = \"n1-standard-1\"\n vm_image {\n project = \"cloud-notebooks-managed\"\n family = \"workbench-instances\"\n }\n metadata = {\n idle-timeout-seconds = \"10800\"\n }\n }\n }\n\nHow idle shutdown works\n-----------------------\n\nYour instance shuts down when there is no kernel activity for the\nspecified time period. For example, running a cell or new output printing\nto a notebook is activity that resets the idle shutdown timer. CPU usage\ndoesn't reset the idle shutdown timer.\n\nIf you leave JupyterLab open and you don't interact with the window,\nthe instance will shut down after the idle shutdown period.\n\nBy default, idle shutdown looks for activity in kernels running in\nthe following addresses of the instance:\n\n- `127.0.0.1:8080/api/sessions`\n- `127.0.0.1:8080/api/terminals`\n- `127.0.0.1:8080/api/kernels`\n\n| **Warning:** By default Jupyter runs on port 8080. If this port is changed, idle shutdown won't detect any kernel activity.\n\n### Scheduled executions run while instance is shut down\n\nIf you have scheduled an execution of a notebook file\nin a Vertex AI Workbench instance that is shut down,\nthe execution still runs on schedule.\n\nWhat's next\n-----------\n\n- To run a notebook file on a schedule, even when your instance is shut down, see [schedule a notebook\n run](/vertex-ai/docs/workbench/instances/schedule-notebook-run-quickstart)."]]