Skip to content

Prebuilds are stuck in 'queued' #9395

Closed
@svenefftinge

Description

@svenefftinge

Bug description

The DB contains +6k entries of prebuilds in 'queued' state. Would be good to understand what happens, clean things up and prevent these from being created further.

Updating prebuilt.state on failed prebuild start

During this incident we discovered that there seems to be an ongoing issue with updating state for prebuilds whose instances never reach RUNNING phase (note the empty startedTime):

SELECT wsi.id, wsi.creationTime, wsi.phasePersisted, wsi.status, wsi.startedTime, wsi.stoppingTime, wsi.stoppedTime
   FROM d_b_workspace_instance AS wsi
   JOIN d_b_prebuilt_workspace AS pws
      ON pws.buildWorkspaceId = wsi.workspaceId
   WHERE pws.state = 'queued'
	AND wsi.phasePersisted = 'stopped'
	ORDER BY wsi.creationTime DESC;

Note: Especially older entries could also be fallout from other incidents + cleanups, but there seems to be a couple of fresh ones every day.

Steps to reproduce

select * from d_b_prebuilt_workspace where state = 'queued' order by creationTime;

Metadata

Metadata

Assignees

Labels

team: webappIssue belongs to the WebApp teamtype: bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions