github nenadjokic/navibeat-mixes v0.9.12

3 hours ago

On a slow machine, a call Navidrome kills now leaves a mark, and the next call takes a smaller bite.

Reported from a Raspberry Pi 3B on Navidrome 0.64.0: the scheduler callback died at 30.79s with budgetSeconds set to 3. Lowering that setting could not have helped. The budget is read between units of work and never during one, and a request already on its way to the server cannot be called back from inside the plugin, so when one Subsonic call takes longer than the 30 seconds Navidrome allows, the plugin is killed before it ever reaches the line that reads its own budget. A killed call also saves nothing, so every continuation repeated the same too big bite and nothing recorded that it had happened.

The plugin now writes a mark into its own store before the work and clears it when the call returns. Finding it still there at the start of a call is the evidence that the previous call was killed. Each kill in a row takes the next step down: a quarter of the albums per list page, then a twentieth, then the same without getStarred2, which is last because it takes no size parameter, so the only way to ask for less of it is not to ask (album fetches still carry each track's starred flag, so that costs coverage rather than the mix). A bite that survives is remembered for the rest of the day, so the run does not go back to the big one and get killed again. If even the smallest bite is killed, the log says so in one line and the plugin stops asking for continuations until the next daily run instead of adding load to a machine that cannot serve the call.

The README section on slow servers said to lower budgetSeconds when the deadline message persists. That advice cannot work, and it is replaced with what actually happens.

Install: download navibeat-mixes.ndp below and upload it on the Navidrome Plugins page, replacing 0.9.11.

Don't miss a new navibeat-mixes release

NewReleases is sending notifications on new releases.