Skip to content

Do we want to add support for resumable Creator? #1087

Description

@benoit74

For now, it is not possible to stop a "writer" process (Creator) and resume later. ZIMs have to be created in one go.

While this is ok for small ZIMs, it becomes to be a kind of hurdle for big ZIMs like the one of stackoverflow.com_en_all or wikipedia_en_all_maxi; the whole run takes about many days (around a week typically, or even more), and many kind of intermittent problem can occur during this week and cause the scraper to stop.

Currently, when the scraper stops, we have no solution in libzim to resume, so the current strategy is a kind of brute-force approach: we restart the scraper and hope no problem will occur again.

This just happened to https://farm.openzim.org/pipeline/2baf25b3-4838-47a5-9199-b9c278f90f1d where communication between worker and Zimfarm API went down for a long time and Zimfarm decided to cancel the task.

Current strategy incurs:

  • a significant waste of computing resources
  • a potential inability to create ZIMs for longer periods than necessary: since we always restart from scratch, we give more chances for an intermittent problem to occur again
  • too much drain of attention for content team
  • frustration for our users which keep waiting for some ZIMs to get updated and barely see any progress (if we resume, progress can only increase ; for now, we start over so progress restart from 0 at each attempt)
  • difficulties to drain a worker for maintenance: see e.g. Fix custom location of container data on non-k8s machines kiwix/operations#683 (comment)
  • hard work in scraper and Zimfarm to increase resiliency to rare intermittent issues (where we could just not mind too much and benefit from resume capabilities)
  • difficulties to fix bugs: since it takes long elapse to create these ZIMs, it takes long time to realize the ZIM has a bug not seen in other ZIMs of same scraper, and then we start the whole loop again once fix has been (hopefully) implemented

I feel like it might be the right moment to start discussing feasibility and strategy to have the capability to resume a Creator process. Downside of such a move is increased complexity in libzim, scraper and Zimfarm.

I obviously don't yet have much details of what this move can entail, but I can imagine something around:

  • savepoint operation in Creator to save current memory state needed to resume
  • restore operation in Creator to restart operation from a savepoint
  • "read" capability on Creator to know what is already present in a ZIM under creation

WDYT? Is this a move which makes sense to you? Should this be planned for somewhere in late 2026 / early 2027?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions