9.3.4 errors

I’m using 9.3.4 and PHP version 7.3.31. Short of rebuilding the whole site, can someone solve this problem. I keep getting these error messages every time I move around on the site. The first error message I get is
Messenger Worker Message Failed: /var/www/concrete5/public/updates/concrete-cms-9.3.4-remote-updater/concrete/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:130 Handling “Concrete\Core\Command\Batch\Command\HandleBatchMessageCommand” failed: Handling “Concrete\Core\File\Command\GeneratedThumbnailCommand” failed: An image could not be created from the given input

Which triggers this

Rejected message Concrete\Core\Command\Batch\Command\HandleBatchMessageCommand will be sent to the failure transport Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineSender.

Which triggers this

Exception Occurred: /var/www/concrete5/public/updates/concrete-cms-9.3.4-remote-updater/concrete/vendor/symfony/serializer/Encoder/JsonEncode.php:54 Malformed UTF-8 characters, possibly incorrectly encoded (0)

This has been going on for a while and I’ve found no way to fix this
Any Ideas ??

Bob

Some ideas:

  • try running the site if you can on PHP8.x. PHP7 still works, but it’s end of life
  • try changing your Image generation mode from GD to ImageMagik (or the other way)
  • try running the Generate thumbnails task in the Tasks section of the dashboard, to see if that clears whatever it’s trying to process
  • check that you’ve allocated enough memory to PHP, bump that up if you can
  • try changing the Thumbnail Generation Strategy setting on /index.php/dashboard/system/files/thumbnails/options

Its also worth creating an issue on GitHub for this. Whatever is happening with the data, the batch command should not be bugging out like it is.

Your web server and/or Concrete logs can probably give you more details, but it sounds like you might be missing the GD extension, have an outdated version, or are running out of memory when processing thumbnail images.

As a workaround, you could try disabling thumbnails or replace the problematic image (likely the most recently uploaded image, or possibly the one most recently added to a block).

But I agree with JohntheFish, it should handle this case more gracefully.

The strange thing is I can generate the problem every time I run the “Generate Thumbnails” task. It gets stuck about 12 times (It says I’ve got 296 thumbnails?) … Makes no sense as this is a small single page site with 60+ images…

Check the logs for more details. Really sounds like one of those images is large and making the thumbnail is consuming too much memory. Multiple thumbnails are made for each image, so it’s not unusual to have multiple times more thumbnails than images.

How would I check that. I know memory is not a problem as I’ve got 32gb on the machine and the site is a single page with only 60+ images. I checked all the images and the largest one I have is 215kb

I created a general issue about error handling within tasks.

1 Like

The memory limits are specific to the PHP config. Check the environment for memory_limit

Here are the environment settings

PHP Version

7.3.31-1~deb10u7

PHP Settings

max_execution_time - 300
log_errors_max_len - 1024
max_file_uploads - 80
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
max_multipart_body_parts - -1
memory_limit - 128M
post_max_size - 75M
upload_max_filesize - 150M
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - no value
session.gc_maxlifetime - 7200
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5