Hello everyone,
I’m encountering a critical Out-Of-Memory (OOM) issue on my Seafile instance. My environment: Seafile 13 (Docker), Raspberry Pi 4 (2 GB RAM).
The problem is the following: I uploaded a large PDF file (around 1.5 GB) into a library. Whenever I enter the directory containing this file via the Web UI (Seahub), the server instantly freezes and the Linux kernel triggers the OOM Killer, killing the python3 (Seahub) process. This happens upon opening the folder view, before clicking on or opening the file itself.
I tried restricting thumbnails and previews in seahub_settings.py, but Seahub seems to ignore these settings during directory listing for PDFs. I tried these:
ENABLE_THUMBNAIL = False
ENABLE_PDF_PREVIEW = False
THUMBNAIL_EXTENSION = (‘png’, ‘jpg’, ‘jpeg’, ‘gif’, ‘bmp’)
THUMBNAIL_IMAGE_SIZE_LIMIT = 30
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
Despite these configurations, Seahub still attempts to process the 1.5 GB PDF when the folder is loaded, driving RAM usage above 1.9 GB and causing a crash. I noticed discussions mentioning that ENABLE_THUMBNAIL might be deprecated or removed in recent versions, but there doesn’t seem to be a working guardrail to prevent PDF thumbnail worker processes from buffering multi-gigabyte files directly into system memory.
Is there a working configuration in Seafile 13 to strictly enforce a maximum file size limit for PDF thumbnail generation during directory listing? Is there a way to completely disable PDF background processing without breaking image thumbnails for standard photo formats?