Symptoms
-
When installing or updating (if already installed) an application like WordPress either from Tools and Settings > Application Vault or from Domains > example.com > Applications a progress bar is shown but never changes from 0%
-
Checking the longtasks table in the database, stuck tasks can be seen:Â
# plesk db “select * from longtasks where status <> ‘done'”
+———————+—-+————–+———+—————–+———+—————-+—————-+————-+—————+———————+—–+————+
| startTime | id | type | status | statusProcessed | context | progressStatus | progressParams | progressMax | progressValue | finishTime | pid | externalId |
+———————+—-+————–+———+—————–+———+—————-+—————-+————-+—————+———————+—–+————+
| 2018-11-06 17:37:04 | 76 | aps-download | started | 0 | NULL | queue | NULL | 100 | 0 | 0000-00-00 00:00:00 | 0 | NULL |
| 2018-11-06 17:37:05 | 77 | aps-download | started | 0 | NULL | queue | NULL | 100 | 0 | 0000-00-00 00:00:00 | 0 | NULL |
+———————+—-+————–+———+—————–+———+—————-+—————-+————-+—————+———————+—–+————+ -
Trying to work with applications through CLI such as downloading a package can be executed successfully but the process does does not finish:
# plesk bin aps -d -package-name mediawiki
The task to download APS package started. Task id: 77# plesk bin aps -g 77
The task is in progress.
total: 100
completed: 0
The task is current.
Cause
Stuck tasks in the
table.
psa.longtasks
Resolution
-
Backup the
database by following the instructions form the article How to backup/restore a Plesk database dump?
psa
-
Log into MySQL and access the
database:
psa
# plesk db
-
Delete stuck long tasks tasks:
MYSQL_LIN: mysql> delete from longtasks where status <> ‘done’;