3

I get a stuck GeneratePendingTransforms task over and over again. In the first place, I don't know why any transforms are getting created at that point. By now, almost every image transform for every image on the site must have been create once. And it seems like those generations happen on the weirdest moments. It can't be the images of a freshly posted entry that had to be created, because there's always +300 steps in the tasks (and there are 5 images at most on a new entry).

Anyway. It seems that those tasks also get stuck every time. I don't know why they get stuck. And yes, I know you can change the status to pending. But I can't keep doing this 10 times a day. The craft log doesn't give me much more information. Right now I have a GeneratePendingTransforms task that is stuck at step 333 from 341. And this is the latest info in the craft log file:


2016-10-08 21:55:00

Level error Category exception.Craft\HttpException.404 Message Craft\HttpException in /srv/users/ijnluser/apps/ijnl/craft/app/controllers/TemplatesController.php:59


I don't know if stuck tasks also prevent the execution of pending tasks? But I also noticed cached items don't get cleared at all, and I have to clear them manually. Could this be because they are waiting to run, after the stuck task is done?

2 Answers 2

3

I think to solve your issue we're going to need a bit more of information. A couple of things you can try:

  • set a higher max execution time. I think normally the max execution time is 120 sec. and this sometimes blocks other transforms
  • try using the craft task manager plugin to remove any tasks that get stuck.
  • try reindexing the images, remove all the cached items, check your folder permissions

That being said, I stopped using the image transforms Craft provides out of the box and started using Imager. Imager provides a handy way to do transforms in your template. Works like a charm and lots of handy options.

1
  • 1
    I now set the execution time a bit higher, let's see what it does. I was already using taskmanager to remove or restart tasks. It's a handy plugin, but I can't keep doing this all the time. And the problem with Imager is that it doesn't work with Google Cloud. It saves all the transforms locally. Commented Oct 10, 2016 at 7:13
2

I'd suggest reading over the Stuck Tasks support article. It has general debugging tips for all tasks for figuring out why they get stuck and more specifically debugging tips for the Generate Pending Transforms task.

I don't know if stuck tasks also prevent the execution of pending tasks?

Yes, a stuck task will prevent any other tasks created after it became stuck from running.

2
  • 1
    Hi Brad. I already increaed memory limit and execution time, but no luck. Sometimes I see things like this in the craft log though: Could not delete the file /srv/users/ijnluser/apps/ijnl/craft/storage/runtime/assets/sources/843.jpg because the file does not exist. I don't know why that particular file would not exist. This error shows up at the same time: Tried to load an image at /srv/users/ijnluser/apps/ijnl/craft/app/resources/images/samples/sample./srv/users/ijnluser/apps/ijnl/craft/storage/runtime/temp/assets57fb3d2ba38049.17356696.jpg, but the file does not exist. Commented Oct 10, 2016 at 9:44
  • 1
    Those just seem like you've got an out-of-date Asset index. You can regenerate using the Update Asset Indexes tool in the CP.
    – Brad Bell
    Commented Oct 10, 2016 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.