Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close comics during scan #3312

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

nichwall
Copy link
Contributor

@nichwall nichwall commented Aug 20, 2024

This PR partially addresses some of the CBR/CBZ issues.

As mentioned in #2750, the memory does not get freed until after the comics have completed parsing. This PR adds the archive.close() call at the end of the extraction functions.

I tested this by:

  • Grabbing a number of random images from my personal photos
  • Created a 1.8 GB CBZ and CBR comic file (no cover image, just ran the directory of images through the zip and rar bash utilities)
  • Ran a scan without these changes (server crashed during scan of second book)
  • Ran a scan including these changes (server completed scan of both books)

I don't have any "real" comics, so additional testing should be done on edge before this is part of a full release. My homemade comics did not actually load in the ereader, but were parsed during the scan.

@advplyr
Copy link
Owner

advplyr commented Aug 21, 2024

Thanks!

@advplyr advplyr merged commit f66cea9 into advplyr:master Aug 21, 2024
4 checks passed
@nichwall nichwall deleted the close_comics_during_scan branch August 21, 2024 22:43
@Nda70
Copy link

Nda70 commented Aug 29, 2024

Hi, first comment here and french, be kind.
last edge image from 9h ago still occupy all ram in 1mn and finish by crash.
i'm scannig comics big ,but not huge, library (cbr, cbz, pdf)
Docker 2.12.3 hosted on synology NAS.
On debug log nothing appear, it begin a new parsing and log stop, even crash_log.txt isn't created.
daily logs appear normally, but scans and crash ones are not.
Last log an container manager says:
wasm streaming compile failed: typeerror: failed to parse url from /client/dist/libarchive/wasm-gen//libarchive.wasm
then
falling back to arraybuffer instantiation.
then crash.
Hope it could helps, thanks for your work here.
Have a nice day.

@advorsky73
Copy link

Same here.... Still crashing with around 400 cbr/cbz files (i have 64gb ram on that machine though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants