25

In the CMS the progress indicator for tasks is stuck and not completing its jobs. What can I do to resolve this?

task indicators

a-am
  • 2,857
  • 1
  • 19
  • 25

1 Answers1

37

More of a "How do I debug stuck tasks" answer, but it should help you.

Open up your craft_tasks table. You'll see one task in with a 'status' of 'running' and if you refresh the table several times, the 'currentStep' value for that task is no longer incrementing. That's your stuck task.

Set that task's status to 'pending', and reload any page in the control panel to re-trigger the task.

If it gets stuck again, immediately go to your craft/storage/runtime/logs folder and check for a phperrors.log file. If that exists, it will likely hold the error message for why the task is hung.

90% of the time, when a task gets stuck, it's because it has ran into some environmental limitation (PHP max_execution_time, memory_limit, etc.).

Update:

Just added a help article for this here: https://craftcms.com/support/stuck-tasks

Lindsey D
  • 23,974
  • 5
  • 53
  • 110
Brad Bell
  • 67,440
  • 6
  • 73
  • 143
  • Is the max_execution_time php ini hardcoded into GD/Image.php? I keep running into Maximum execution time of 30 seconds exceeded in /var/www/craft.lovindublin.com/craft/app/vendor/imagine/imagine/lib/Imagine/Gd/Image.php on line 584 but my php_info says it's 300 – Seán O'Grady Sep 05 '14 at 17:12
  • Must be coming from something else then. If you're running things like FastCGI or nginx or Suhosin or mod_security, they each have their own (differently named) functionally equivalent settings. – Brad Bell Sep 05 '14 at 17:25
  • Intriguing. Fix in new help text cleared it. Five weeks running (I was busy), no idea what caused. Probably GoDaddy, where this installation was client-stuck...thanks, Brad, as always. – narration_sd Dec 11 '14 at 01:09
  • 3
    Would be nice to have an option to do this manually from the CP. Unfortunately on our server there is no phpmyadmin installed which makes this task very inconvenient. – m9dfukc Apr 23 '15 at 12:43
  • Just for posterity, this feature is now there, by Craft 2.5 release at least. You see a task is running, click the rotating gezotz, may retry or delete it. Thank Brad, I am sure... – narration_sd Dec 02 '15 at 02:58
  • The tasks table in the latest versions of Craft is called just tasks. – certainlyakey Dec 29 '16 at 19:51
  • 1
    @certainlyakey just depends on what you have your craft/config/db.php's tablePrefix config setting set to. – Brad Bell Dec 29 '16 at 20:47