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

<ul>
<li>set a higher max execution time. I think normally the max execution time is 120 sec. and this sometimes blocks other transforms</li>
<li>try using the <a href="https://github.com/boboldehampsink/taskmanager" rel="nofollow">craft task manager plugin</a> to remove any tasks that get stuck. </li>
<li>try reindexing the images, remove all the cached items, check your folder permissions</li>
</ul>

<p>That being said, I stopped using the image transforms Craft provides out of the box and started using <a href="https://github.com/aelvan/Imager-Craft" rel="nofollow">Imager</a>. Imager provides a handy way to do transforms in your template. Works like a charm and lots of handy options.</p>

CC BY-SA 3.0
2016-10-10T07:13:53.103Z
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.
Bart Rylant
CC BY-SA 3.0
2016-10-09T19:26:45.420Z
2016-10-09T19:26:45.420Z
Jan_dh
<p>I'd suggest reading over the <a href="https://craftcms.com/support/stuck-tasks" rel="nofollow">Stuck Tasks</a> support article.  It has general debugging tips for all tasks for figuring out why they get stuck and more specifically debugging tips for the <a href="https://craftcms.com/support/stuck-tasks#debugging-stuck-generate-pending-transforms-tasks" rel="nofollow">Generate Pending Transforms</a> task.</p>

<blockquote>
  <p>I don't know if stuck tasks also prevent the execution of pending tasks?</p>
</blockquote>

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

CC BY-SA 3.0
2016-10-10T09:44:52.390Z
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.`
Bart Rylant
CC BY-SA 3.0
2016-10-10T17:15:08.893Z
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
CC BY-SA 3.0
2016-10-09T21:59:41.750Z
2016-10-09T21:59:41.750Z
Brad Bell
<p>I get a stuck <code>GeneratePendingTransforms</code> 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).</p>

<p>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 <code>pending</code>. 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 <code>GeneratePendingTransforms</code> task that is stuck at step 333 from 341. And this is the latest info in the craft log file:</p>

<hr>

<p>2016-10-08 21:55:00</p>

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

<hr>

<p>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?</p>

<image-transforms><tasks><logs>
GeneratePendingTransforms stuck every time
# GeneratePendingTransforms stuck every time

(Asked by: username_0 on 2016-10-08)

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?

**Tags:** image-transforms, tasks, logs


---

## 2 answers

### Answer by username_1 on 2016-10-09. Score: 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](https://github.com/boboldehampsink/taskmanager) 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](https://github.com/aelvan/Imager-Craft). Imager provides a handy way to do transforms in your template. Works like a charm and lots of handy options.

> **Comments:**
> **username_0**: 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.  

---

### Answer by username_2 on 2016-10-09. Score: 2

I'd suggest reading over the [Stuck Tasks](https://craftcms.com/support/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](https://craftcms.com/support/stuck-tasks#debugging-stuck-generate-pending-transforms-tasks) 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.

> **Comments:**
> **username_0**: 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.`  
> **username_2**: 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.  

---

