-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: The compression effect of compress-pdf is not good, and the memory it occupies is not released #2506
Comments
@Vincentauyeung Hello there! I'm here to help you with any issues, answer questions, and guide you on how to become a contributor. If you need assistance, feel free to ask! There is a similar open issue regarding high RAM usage in Stirling-PDF. The suggested solution involves configuring memory limits in Docker. For instance, setting a memory limit of 1GB in the Regarding the compression process, the For the memory not being released after tasks, you might want to ensure that temporary files are properly cleaned up. Stirling-PDF handles temporary files by deleting them after the process completes, which should help in managing memory usage [3][4]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I see you inputted multiple pdfs and that some errored Additionally did all pdfs compress badly that you tried , even compression level #10 etc |
I tried several files using level 9 compression, but the results were not good. However, these files could be compressed to 10% using level 3 in version 0.33.1. 2024-12-19 00:00:00,007 INFO s.s.S.c.s.d.DatabaseBackupHelper [scheduling-1] Deleted oldest backup: backup_202412150000.sql 2024-12-20 01:03:59,670 INFO s.s.S.SPdfApplication [main] Starting SPdfApplication v0.36.4 using Java 21.0.5 with PID 10 (/app.jar started by stirlingpdfuser in /) |
I attempted to compress the same 1GB file repeatedly, and after a few times, an error occurred. The likely reason is that memory is not released immediately after a task is completed, and multiple compressions lead to full memory usage。 |
Installation Method
Docker
The Problem
In version 0.36.4, the compression effect on files isn't significantly different. The same file had a compression ratio of 10% in version 0.33.1. Additionally, in version 0.36.4, the memory usage by Docker is relatively high and is not released after the task is completed, which can lead to failures when there are many tasks.
Version of Stirling-PDF
0.36.4
Last Working Version of Stirling-PDF
0.33.1
Page Where the Problem Occurred
No response
Docker Configuration
No response
Relevant Log Output
Additional Information
No response
Browsers Affected
No response
No Duplicate of the Issue
The text was updated successfully, but these errors were encountered: