Wikisource users regularly report that e-book export fails. This problem, which appears to be intermittent, afflicts the various export options: Epub, Mobi, and Pdf (these are the main three we're interested in).
Your assignment is to investigate this issue and come up with feasible ideas for ways to strengthen the WSexport tool so that it works reliably.
(Below are a list of tickets, in Github and Phabricator, that relate to this issue. They're offered only as clues/starting points. Many of them are bound to be duplicates, stemming from a common set of core problems.)