zackad/manga-server

Memoryleak when generating cover thumbnail in some cases

Closed this issue · 4 comments

zackad commented

This problem caused by Imagine\Image\Metadata\ExifMetadataReader that load actual image data into memory encoded as base64 string. There's no easy fix for this except by increasing memory limit.

zackad commented

increasing memory limit is not scalable solution. we need to handle large image such as korean longstrip format that would easily blew our memory constraint.

possible solution is to use imagemagick extension to handle image manipulation.

zackad commented

This happen with docker image from bitnami/php-fmp@sha256:92c3493394f81071e68d67a31efbe6523c9a6315ef71dffbc6121303dbcec343. Cannot reproduce with dev environment using php83 from nixpkgs.

zackad commented

try other docker images, either debian or alpine based and even frankenphp. still can't figure it out why memory usage is significantly different.

I consider this issue as resolved.