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
libvips - glib resource temporarily available #1456
Comments
Sorry, I don't know. Perhaps your provider has set a very low thread limit? It would depend how they have set up your linux environment, but for example: I think you will need to ask them. As a workaround, you can try reducing the size of the libvips threadpool. Put this in your startup code: Vips\Config::concurrencySet(1); Now libvips will only use one thread to calculate images. |
Hello @jcupitt I will ask my provider for that issue. |
By default it tries to keep all available hardware threads busy, so usually 8 threads on a four core server, for example. |
Thank you for the help. I will close this issue for now and give feedback as soon I have more test results. |
@revathi-murali at this time I have followed @jcupitt 's recommendation and set the Concurrency to 2. Since I'm working in a cageFs environment with more users I can't expend that much resources or allow vips to use as it pleases. It is matter or testing values. For me, setting concurrency up to 2 works. If your software still causes the error try setting to 1 or try to lazy load or queue the images somehow for processing. If it still doesnt work, you have to acquire more resources or dedicate a machine/vps for that kind of processing. |
Thanks for your suggestion. The problem is, the issue is right now happening in @jcupitt Any idea on when |
Hello,
I am getting some errors probably related to creating threads em some kind of resource temporarily unavailable.
Assume somefile.jpg has >= 3.5Mb filesize and $mime can have jpeg / webp values.
Here is the code i'm using with PHP 7.3 in a CentOS machine powered by Cpanel / Cloudlinux and with libvips 8.5.6 :
`
header("Content-type: image/$mime");
$image = Vips\Image::thumbnail("somefile.jpg",320);
$buffer = $image->writeToBuffer($ext);
echo $buffer;
`
I am having the following error messages from PHP:
`
[28-Oct-2019 09:46:31 Europe/Lisbon] PHP Fatal error: Uncaught Jcupitt\Vips\Exception: glib: Error creating thread: Resource temporarily unavailable
in vips/vendor/jcupitt/vips/src/Image.php:778
Stack trace:
#0 vips/vendor/jcupitt/vips/src/Image.php(1183): Jcupitt\Vips\Image::errorVips()
#1 vips/downloads/sizer.php(29): Jcupitt\Vips\Image->writeToBuffer('.jpg')
#2 {main}
thrown in vips/vendor/jcupitt/vips/src/Image.php on line 778
[28-Oct-2019 09:46:52 Europe/Lisbon] PHP Fatal error: Uncaught Jcupitt\Vips\Exception: glib: Error creating thread: Resource temporarily unavailable in vips/vendor/jcupitt/vips/src/Image.php:778
Stack trace:
#0 vips/vendor/jcupitt/vips/src/Image.php(1183): Jcupitt\Vips\Image::errorVips()
#1 vips/downloads/sizer.php(29): Jcupitt\Vips\Image->writeToBuffer('.jpg')
#2 {main}
thrown in vips/vendor/jcupitt/vips/src/Image.php on line 778
`
Is this something I need to check with my hosting provider?
The text was updated successfully, but these errors were encountered: