Closed
Description
I have a server running Ubuntu 22.04 where I have apache and php installed. I have recently started using libvips for php, and I have noticed that every time a php script is run, the amount of ram used increases more and more, without being freed. I am forced to use Vips\Config::shutDown()
at the end of the script otherwise the server ram gets saturated. I tried to use Vips\Config::cacheSetMax(5)
but nothing changes (memory grows more and more).
php file example:
<?php
require __DIR__ . '/vendor/autoload.php';
use Jcupitt\Vips;
$image = Vips\Image::newFromFile($inputImagePath);
//some operations on the width and height of the image
//.....
$image = Vips\Image::thumbnail($inputImagePath, $width, ['height' => $height, 'crop' => 'centre']);
$image->writeToFile($outputImagePath, ['Q' => $quality]);
Also sometimes libvips returns an error:
(process:211949): GLib-GObject-WARNING **: 16:54:47.542: cannot register existing type 'VipsObject'
(process:211949): GLib-CRITICAL **: 16:54:47.542: g_once_init_leave: assertion 'result != 0' failed
(process:211949): GLib-GObject-CRITICAL **: 16:54:47.542: g_type_register_static: assertion 'parent_
type > 0' failed
(process:211949): GLib-CRITICAL **: 16:54:47.542: g_once_init_leave: assertion 'result != 0' failed
libvips42 version: 8.12.1
php-vips version: 2.0.3
Metadata
Metadata
Assignees
Labels
No labels