Symptoms
-
A lot of tasks in
longtasks
table withnot_started
status andNULL
asfinishTime
:C:>plesk db “SELECT id,type,status,finishTime FROM longtasks WHERE status <> ‘done'”
+—–+——————————————+————-+————+
| id | type | status | finishTime |
+—–+——————————————+————-+————+
| 404 | service-node-environment-synchronization | not_started | NULL |
| 405 | database-upload | not_started | NULL |
+—–+——————————————+————-+————+
Cause
Product issue:
-
#PPPM-11429 “Long tasks now fail with an error message instead of silently getting stuck and never starting if the psaadm and Plesk Administrator users are assigned the “Deny log on as a batch job” security policy.”
Fixed in:- Plesk Obsidian 18 February 2020 (Windows)
Resolution
Please consider updating your server:
Workaround
If update is not possible for some reason you may try the following
workaround
These orphaned tasks do not affect the server. However, can be removed with solution below:
-
Connect to the server via RDP.
-
Open command prompt and create database backup:
C:> plesk DB dump psa > C:psa.bak.sql
-
Delete all failed tasks from two tables (longtasks and longtaskparams):
C:> plesk db “DELETE longtasks, longtaskparams FROM longtasks LEFT JOIN longtaskparams ON longtasks.id = longtaskparams.task_id WHERE longtasks.status = “not_started” AND longtasks.finishTime IS NULL”