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

Memory leak when reaching the last page of a PDF book #1800

Open
5 tasks done
francoishernandez opened this issue Dec 20, 2024 · 3 comments
Open
5 tasks done

Memory leak when reaching the last page of a PDF book #1800

francoishernandez opened this issue Dec 20, 2024 · 3 comments
Labels
cannot reproduce The situation cannot be reproduced by the developers troubleshooting

Comments

@francoishernandez
Copy link

Steps to reproduce

  1. Open a book (in my case a PDF magazine) in reading mode (tested with Chrome browser)
  2. Move to the last page
  3. Press the right arrow key when on last page
  4. Memory is shooting up and the JVM is not happy (it's stuck, I need to manually restart the docker container)

Expected behavior

Not exactly sure what is happening. There should probably some form of safeguard to prevent this behaviour. Or prevent moving past the last page.

Actual behavior

Memory usage is shooting up, saturating the allocated JVM memory.

Capture d’écran 2024-12-20 à 22 42 42

Logs

_komga_logs (1).txt

Komga version

1.15.1

Operating system

Ubuntu 24.04 w. docker

Installation method

Docker

Other details

I have seen various discussions around memory usage. I don't think that's the same issue here, as there seems to be a bug with the reader when reaching beyond the last page of a book.

Docker image sha: c8430f2cde3239868ae186aae88a1f1bbbfec4d9afa378de5927fd9c0d7bfc14

Acknowledgements

  • I have searched the existing issues (open AND closed) and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have checked the FAQ.
  • I have updated the app to the latest version.
  • I will fill out all of the requested information in this form.
@gotson
Copy link
Owner

gotson commented Jan 2, 2025

How big is the PDF ?

The JVM is running out of heap space: java.lang.OutOfMemoryError: Java heap space

Did you set any environment variable to limit the JVM memory ?

@gotson gotson added troubleshooting waiting for feedback Waiting for a feedback from the issue creator and removed triage labels Jan 2, 2025
@francoishernandez
Copy link
Author

How big is the PDF ?

Does not seem really relevant here, I reproduce with PDFs of various size, from ~20MB to ~100MB.

Did you set any environment variable to limit the JVM memory ?

Nope, it seems to default to the standard 4GB.

It seems that whenever we reach the end of a PDF, and go to the next one (keep pressing the right arrow), it happens. Don't you reproduce?

I just reproduced with another random PDF picked in my library.

Capture d’écran 2025-01-03 à 22 28 55

@gotson
Copy link
Owner

gotson commented Jan 6, 2025

I can't reproduce.

@gotson gotson added cannot reproduce The situation cannot be reproduced by the developers and removed waiting for feedback Waiting for a feedback from the issue creator labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce The situation cannot be reproduced by the developers troubleshooting
Projects
None yet
Development

No branches or pull requests

2 participants