Page MenuHomePhabricator

requeueTranscodes.php --throttle may "hang"
Open, LowPublic

Description

As I recall from prior batch encoding fun, TimedMediaHandler's requeueTranscodes.php maintenance script's --throttle option is a bit unreliable. It works by trying to count how many queued but not yet completed or errored transcodes are in the transcode table, and waiting until that number goes back down to or below the prior value before enqueueing the next file.

However this could fail if the number went up, and didn't go back down -- which seemed to be happening in the background with some kind of failure.

IIRC I put in a timeout hack but I wasn't 100% sure it was working right. Recommend checking over this to make sure it works properly and has a sensible behavior of how to continue. If there are production rows that are failing, then we need to figure out how to detect that and either prevent it or stale them out.

I consider this a blocker for future batch-encoding work in production. Doesn't have to be complicated, just double-check what's going on and either work around it or put in a proper fix for the failing entries.

Event Timeline

i think bugs like T414348 break this indeed. The list of in progress grows because due to errors in unexpected code paths, the files never go out of in-progress, and that breaks that logic that you describe.

It would help if the transcode row also had a reference to a jobqueue id or something, so we could run jobs to reset those jobs, but I don't think we have jobids ?