Replies: 5 comments 6 replies
-
ps. the command I'm using is \Jcupitt\Vips\Image\thumbnail_buffer. Then I write the file to disk. from looking online, should I be calling Vips\Config::shutDown() after the thumbnail_buffer command? |
Beta Was this translation helpful? Give feedback.
-
Hiya, I would have something to limit the number of simultaneous conversions. Or pay (ugh!) for a more powerful server. |
Beta Was this translation helpful? Give feedback.
-
Thanks John, sorry to be dim but when you say something to limit the number of simultaneous requests, do you have something in mind? or do you simply mean don't have too many uncached images on the same page? Also, I just tried to use Config::shutdown and that method doesn't exist. I think it's now Vips\FFI::shutDown(). Should I be using that or is it not needed? |
Beta Was this translation helpful? Give feedback.
-
Sorry John, I misunderstood. Yes, I can queue the image thumbnailing but then I can't serve the images on demand as far as I understand. I suppose in the worst case, I'll just change my code to generate all the thumbnails in advance, queueing the operations as you suggest. However, as a test, I just tried setting pm.max_requests to a low number...
And now the pages can load without crashing PHP. The log shows the processes stopping and starting but PHP doesn't go down. As I mentioned, I'm just a hobby coder and I don't really understand all this stuff - I'm just tinkering. |
Beta Was this translation helpful? Give feedback.
-
Hi @jcupitt |
Beta Was this translation helpful? Give feedback.
-
@jcupitt - Hi John! Hope you're well. Sorry, need to pic your brain again -
PHP 8.2
VIPS 8.14.3
PHP-VIPS 2.2.0
My website uses VIPS to thumbnail images and caches the image. If I open a page with too many uncached images (approx 30ish or more) it crashes PHP.
I'm a hobby coder and my server is weak - its the 2gb Linode. I've set it to only have 5 max workers. My php error log reads like this...
Could this be a memory leak issue? or do I just need a more powerful server, so I can increase the number of workers?
Thanks in advance for your help. Sorry if this isn't actually a VIPS issue.
Beta Was this translation helpful? Give feedback.
All reactions