howdytom Posted August 15, 2021 Share Posted August 15, 2021 Hello, Adding more than 4 images to a repeater image field, Processwire crashes with 500 Internal Server Error. The Image file size is below 500 kb and ~2000px, 72dpi. Refreshing the page multiple times will generate and show the image variants at some point. There is no difference using GD or IMagick Image Sizer. Apache/PHP Logs does not show any errors. MAMP is set to 1024M memory_limit, max_execution_time 300 and upload_max_filesize 50MB. I guess this should be more than enough? Is this a PW or MAMP Pro issue? Any advised what is causing the Internal Server Error? Image Fieldtype settings: 'quality' => 75, 'upscaling' => true, 'cropping' => 'southeast' 4 JPEG image dimensions: 1920px, 1500px, 800px, 500px 4 webP image dimensions: 1920px, 1500px, 800px, 500px ProcessWire 3.0.165 MAMP Pro 6.4.2 Apache2.4 PHP7.4.16 I really appreciate any replies. Link to comment Share on other sites More sharing options...
netcarver Posted August 15, 2021 Share Posted August 15, 2021 Ok, so there are no errors in the apache/PHP Logs but what about in PWs log Error/Exception logs? Link to comment Share on other sites More sharing options...
howdytom Posted August 15, 2021 Author Share Posted August 15, 2021 @netcarver Thanks. PW Error/Exception logs are empty. Once I hit reload, the Image-sizer log looks good to me. IMagick Resized: 1_portfoliologo.png => 1_portfoliologo.1500x0se.png (1500x0) 2.7099 secs 31021 => 49210 bytes (quality=75, sharpening=soft) I have enabled PHP/Apache debug log. But there are no error message besides [client ::1:51180] AH01964: Connection to child 11 established (server ___default___:443) [core:debug] [pid 1456] protocol.c(2338): [client ::1:51180] AH03155: select protocol from , choices=h2,http/1.1 for server pw-portfolio [ssl:debug] [pid 1456] ssl_engine_kernel.c(2351): [client ::1:51180] AH02043: SSL virtual host for servername pw-portfolio found [ssl:debug] [pid 1455] ssl_engine_kernel.c(2231): [client ::1:51179] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) [Sun Aug 15 22:14:47.614382 2021] [ssl:info] [pid 1456] Update: I have removed the webP properties from the image fields. However I am still getting 500 Internal Server Error when I add 4-10 files to an image field. Image creating is working fine when I add 1 image, though. It looks like a MAMP specific limitation. Is there anything else I can look up? Not sure how can I debug this further. Link to comment Share on other sites More sharing options...
netcarver Posted August 15, 2021 Share Posted August 15, 2021 Perhaps @horst might have some ideas? Link to comment Share on other sites More sharing options...
horst Posted August 16, 2021 Share Posted August 16, 2021 Only things that seems possible are time limits or memory limits. Are there also logs from imagesizer when adding 10 images. Do you get the 500 when adding the images or only when calling the frontend page? Link to comment Share on other sites More sharing options...
howdytom Posted August 16, 2021 Author Share Posted August 16, 2021 @horst Thank you for your reply. Solution: It turned out I set PHP mode to CGI to use to a different PHP version for every host. It looks like PHP mode CGI uses its own execution time and has additional limitation. Although max_execution_time 300 is set in php.ini it is somehow ignored. Now, with PHP Module mode, I am able to add 50 images without any 500 error. ! :-) Link to comment Share on other sites More sharing options...
howdytom Posted August 16, 2021 Author Share Posted August 16, 2021 I do have a follow-up question: Why is PHP GD and Imagick creation so slow when calling the frontend page? I have to add a lot of images to a PW project. When I add 2 images with 500kb file size, it takes almost 30 seconds to generate 8 WebP/JPEG variations. The Image-sizer log looks good to me: 2021-08-16 14:16:19 username /projekte/corporate-design-test… IMagick Resized: testimage.jpg => testimage.800x0se.jpg (800x0) 1.4486 secs 516332 => 78717 bytes (quality=75, sharpening=soft) 1 hour ago 2021-08-16 14:16:17 username /projekte/corporate-design-test… IMagick Resized: testimage.jpg => testimage.500x0se.jpg (500x0) 0.8468 secs 516332 => 37217 bytes (quality=75, sharpening=soft) 1 hour ago 2021-08-16 14:16:17 username /projekte/corporate-design-test… IMagick Resized: testimage.jpg => testimage.1920x1080se.jpg (1920x1080) 4.7528 secs 516332 => 307819 bytes (quality=75, sharpening=soft) Update: I have tested the site on a production server and image variants are created much faster than in MAMP. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now