gotson / komga

Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support
https://komga.org
MIT License
3.87k stars 233 forks source link

open it and read the comic library and then exit after a while #1687

Closed yangwangkong closed 3 days ago

yangwangkong commented 1 week ago

Steps to reproduce

1.Place the CBZ files, totaling 1.0TB, in a single directory. 2.Add the directory to libraries, unchecking all settings. 3.Click on "Scan library files" (the scan does not start automatically after adding). 4.A certain number of CBZ files will be scanned, and the scanned files will appear as "To be analyzed" in Komga. 5.The scan interrupts, and an error is displayed in the logs (see Logs).

Expected behavior

The scan should complete after a single click of the scan button.

Actual behavior

Please refer to the Steps to reproduce.

Logs

komga.log

Komga version

1.12.1

Operating system

windows 10

Installation method

from download.komga.org

Other details

No response

Acknowledgements

yangwangkong commented 1 week ago

I move it into the ssd, but it still exit after a while.

gotson commented 1 week ago

there's nothing wrong in the logs. Analysis is ongoing, and there's probably a lot of files. You would need to wait at least a day, probably more, to process 1TB of data.

2.Add the directory to libraries, unchecking all settings.

the file hashing is happening in the logs, so probably that was not unticked upon library creation


there's nothing in the logs about the application closing. Are you the one starting the application after it closes ? Or is that automatically restarting ?

Komga does not have an automatic restart capability. So if the application restarts automatically, there must be something else responsible for it.

gotson commented 1 week ago

to add on that, there's no logs about the application doing a shutdown, which points to another process/application killing the app

yangwangkong commented 1 week ago

there's nothing wrong in the logs. Analysis is ongoing, and there's probably a lot of files. You would need to wait at least a day, probably more, to process 1TB of data.

2.Add the directory to libraries, unchecking all settings.

the file hashing is happening in the logs, so probably that was not unticked upon library creation

there's nothing in the logs about the application closing. Are you the one starting the application after it closes ? Or is that automatically restarting ?

Komga does not have an automatic restart capability. So if the application restarts automatically, there must be something else responsible for it.

I find it exit so i open it manually

gotson commented 1 week ago

it looks like something on your system is killing the app (since it shows no logs of shutdown)

yangwangkong commented 1 week ago

but I try on another device(like mac mini),i use the docker,it still exit after a while,i don't understand why it shut down..... And i could not find any software kill the app.May be the memory leak? komga.log this is the mac mini log

it looks like something on your system is killing the app (since it shows no logs of shutdown)

yangwangkong commented 1 week ago

but I try on another device(like mac mini),i use the docker,it still exit after a while,i don't understand why it shut down..... And i could not find any software kill the app.May be the memory leak? komga.log this is the mac mini log

it looks like something on your system is killing the app (since it shows no logs of shutdown)

On the mac mini ,i use the smb to connect the comic library.

gotson commented 1 week ago

And i could not find any software kill the app.May be the memory leak?

memory issues would appear in the logs

ferdnyc commented 1 week ago

@gotson There may not be memory issues showing in the log, but the logs do show Komga start trying to analyze the same file 4 or 5 times... and that file is almost 25GB in size! See line 19735 for the last of the attempts.

It logs without a hash value until line 19491, when the hasher finally finishes with it. ...The last modified date of the file also seems to be changing over the course of the logs, although the size doesn't change.

yangwangkong commented 1 week ago

I try to make it into the windows service,it will not shut down.

gotson commented 1 week ago

and that file is almost 25GB in size!

well, that's a problem then, why is there such big files in the first place ? doesn't make sense

ferdnyc commented 4 days ago

@yangwangkong

but I try on another device(like mac mini),i use the docker,it still exit after a while,i don't understand why it shut down..... And i could not find any software kill the app.May be the memory leak? komga.log this is the mac mini log

The Mac Mini seems to get past the 25GB file OK (somehow; maybe the fact that it's not doing any file-hashing helps), but at least a couple of the crashes seem to happen on the same file, file:/data/EMI/TOGE-15041%20Wagner%20Orchestral%20Works,%20Vol.%201%20-%20Klemperer/2-1/1.pdf, right after Komga prints this warning:

2024-09-04T16:27:53.124Z  WARN 1 --- [taskProcessor-2]
 org.apache.pdfbox.pdfparser.COSParser    : Unexpected XRefTable Entry: 0

Could be a corrupted PDF file that's crashing the parser.

ferdnyc commented 4 days ago

...Why does it look like there are a lot of non-comics files in the directory, as well? For example:

2024-09-04T16:19:20.455Z  INFO 1 --- [taskProcessor-1] o.g.k.i.m.l.LocalArtworkProvider:
 Found file: /data/RCA LIVING STEREO 54CD  DSF/RCA Living Stereo 27 - Giacomo
 Puccini - Madama Butterfly (Erich Leinsdorf, Italiana Opera Orchestra)/folder.jpg

Why does Komga need to be scanning those? Even the possibly-corrupted PDF I mentioned, above, doesn't look like it comes from a comic library, it looks like it comes from a music collection.

gotson commented 4 days ago

Komga doesn't really care whether it's comics or not to be honest.

ferdnyc commented 4 days ago

@gotson No, but I'm thinking if there are corrupted PDF files in those directories or whatever, just not scanning them solves the problem. (I'm also not sure that 25GB file is actually a comics file either. It has a .rar extension, not a .cbr extension.)

yangwangkong commented 3 days ago

I clean my comic library and i remove the music folder,it works now.I don't find it shout down,so i close this issue.