Answers.Body: <p>The answer was, to delete the first row of the <code>queue</code> table <em>in the correct database</em>.<br>
  Also, it helped to increase <code>max_execution_time</code> in /etc/php/7.1/apache2/php.ini</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-07T13:16:07.380Z
Answers.LastActivityDate: 2018-05-07T13:16:07.380Z
Answers.UserDisplayName: kr37
Body: <p>I've got 12 pending tasks, and can't get rid of the first stuck one.  </p>
  
  <ul>
  <li><code>CP-&gt;Utilities-&gt;Clear Caches</code> doesn't seem to help.  </li>
  <li>In the database, in <code>craft_queue</code> there were five rows, the first one seeming to be the stuck one. I deleted all of those</li>
  </ul>
  
  <p>Still the first task is stuck, and by now there are 14 tasks waiting.<br>
  I see that <code>craft_templatecachequeries</code> has over 11,000 rows. Would those be helpful to delete?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-05T13:41:34.163Z
Comments.Text: Can't you delete them in your Database  interface (phpmyadmin /adminer...) ? If not delete them via Craft query
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-06T01:02:24.553Z
Comments.Text: @RobinSchambach Thanks, I did that, but things haven't changed. Question updated with additional info.
Comments.UserDisplayName: kr37
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-06T06:14:44.387Z
Comments.Text: Could you please tell us the name of that task? They should not reappear when you delete them
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-06T12:17:44.347Z
Comments.Text: Thank you, @RobinSchambach, it was a dumb mistake. I deleted them from the wrong database (staging instead of development). Progressing now.
Comments.UserDisplayName: kr37
Tags: <craft3><stalled-tasks>
Title: In Craft 3, how to clear stuck "Deleting Stale Template Caches"
ThreadText: # In Craft 3, how to clear stuck "Deleting Stale Template Caches"
  
  (Asked by: username_0 on 2018-05-05)
  
  I've got 12 pending tasks, and can't get rid of the first stuck one.
  
  * `CP->Utilities->Clear Caches` doesn't seem to help.
  * In the database, in `craft_queue` there were five rows, the first one seeming to be the stuck one. I deleted all of those
  
  Still the first task is stuck, and by now there are 14 tasks waiting.  
  I see that `craft_templatecachequeries` has over 11,000 rows. Would those be helpful to delete?
  
  **Tags:** craft3, stalled-tasks
  
  > **Comments:**
  > **username_1**: Can't you delete them in your Database  interface (phpmyadmin /adminer...) ? If not delete them via Craft query  
  > **username_0**: @username_1 Thanks, I did that, but things haven't changed. Question updated with additional info.  
  > **username_1**: Could you please tell us the name of that task? They should not reappear when you delete them  
  > **username_0**: Thank you, @username_1, it was a dumb mistake. I deleted them from the wrong database (staging instead of development). Progressing now.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-05-07. Score: 3 | Accepted answer
  
  The answer was, to delete the first row of the `queue` table *in the correct database*.  
  Also, it helped to increase `max_execution_time` in /etc/php/7.1/apache2/php.ini
  
  
  ---
  
  