3

My task queue (is that what it's called?) is filled with literally hundreds of "Deleting Stale Template Caches" and every day there seem to be new ones. Along there are also resaving entries tasks and updating URIs.

Because of the amount of tasks, they don't seem to be going down AT ALL. What's the suggestion here?

2

Bump up the PHP Memory limit and max execution time, then change the 0 in the first failed task to 1.

After that go into craft, click the tasks and hit "try again"

|improve this answer|||||
  • I've raised the memory limit to 512M but I'm not seeing any changes yet. Where should I change those values? Is that directly in the DB? Because the interface gives me no options at all, just a list of pending tasks with loading bars. Am I missing a secret task admin panel? Thanks! – cballenar Aug 9 '18 at 14:50
  • It's in the db underneath "queue". If you go into phpMyAdmin > your database > queue > browse > you'll see the table entries, then change fail from '0' to '1' – Matthew Rotter Aug 10 '18 at 15:07
1

Going from Matthew's answer I went to my database and found the queue table. I had tried his way first but I had no task with a 0, all were null, and I wad one with a 1 in it already.

As Matthew said, go to phpMyAdmin > your database > queue, but rather than edit the information I used TRUNCATE on the table.

I went back to my site and it was fixed with, as far as I can tell, no issues. I went into utilities and did a clear cache and it successfully ran and finished.

I did also up my memory_limit in my php.ini file to 512M

Update: I was unsure if this method completely broke my site or not. It seems the answer was likely yes and no. Craft3 let me save an url for a section as {parent} which is obviously going to cause issues eventually. It couldn't save because of that while working in the background. And if I went back it started new tasks but couldn't get past the first.

|improve this answer|||||
  • I don't know if this is related at all, but my site blew up at some point after I had done this. I'm leaving it up in case it's helpful, as I really don't know the specific cause, and I was having minor bugs cropping up before I ever did this. – Darryl Hardin Sep 30 '18 at 13:49
0

The process for debugging stalled jobs in Craft 3 is 90% the same as debugging stalled tasks in Craft 2. Still needs to be updated for Craft 3, but you can use this as a starting point: https://craftcms.com/support/stuck-tasks

There's even a section for the "Deleting Stale Template Caches" task: https://craftcms.com/support/stuck-tasks#debugging-stuck-delete-stale-template-caches-tasks

|improve this answer|||||
  • Thanks for the info, Brad but I'm not using any cache tags in my templates. This is a brand new website, started in Craft 3. Currently it seems stuck "Resaving [section name] Entries" and then it's followed by template caches, screenshot: dropbox.com/s/oanaenyof9e2yj0/… – cballenar Aug 9 '18 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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