You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/templates/extending-templates/prebuilt-workspaces.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,20 +254,23 @@ It is possible for prebuilt workspaces to overwhelm a Coder deployment to the po
254
254
If your Coder deployment is exhibiting the above symptoms, follow these instructions to verify and then rectify the situation:
255
255
256
256
First, run:
257
+
257
258
```bash
258
259
coder prebuilds pause
259
260
```
260
261
261
262
This prevents further pollution of your provisioner queues. Specifically, it will prevent the prebuilt workspaces feature from scheduling new prebuilt workspace creation jobs. Jobs that have already been enqueued will still be processed at this point. Regardless of the steps taken in the rest of your troubleshooting process, remember to run`coder prebuilds resume` once all impact has been mitigated. See the last step in this section for more information.
262
263
263
264
Next, run:
265
+
264
266
```bash
265
267
coder provisionerjobs list --status=pending --initiator=prebuilds
266
268
```
267
269
268
270
This will show a list of all pending jobs that have been enqueued by the prebuilt workspace system. The length of this list is an indicator of whether prebuilt workspaces have overwhelmed your Coder deployment. Human initiated jobs do have priority over pending prebuild jobs, but a prebuild job that is already running will not be preempted to process a human initiated job. An extended list of pending prebuild jobs therefore increases the likelihood that all provisioners may already be occopied when a human user would like to create a workspace. This then transitively increases the likelihood that users will experience delays waiting for the next available provisioner to become available when they try to manage their workspaces or templates.
269
271
270
272
To ensure that the next available provisioner will be given to a human initiated job, run:
@@ -277,13 +280,15 @@ This will clear the provisioner queue of all jobs that were not initiated by a h
277
280
At this stage, most prebuild related impact will have been mitigated. There may still be a bugged template version, but it will no longer pollute provisioner queues with prebuilt workspace jobs. If the latest version of a template is also broken for reasons unrelated to prebuilds, then users are able to create workspaces using a previous template version. Some running jobs may have been initiated by the prebuild system, but these cannot be cancelled without potentially orphaning resources that have already been deployed by Terraform. Depending on your deployment and template provisioning times, it might be best to upload a new template version and wait for it to be processed organically.
278
281
279
282
If you need to expedite the processing of human-related jobs at the cost of some infrastructure house-keeping, then you can run: