Thứ Bảy, 20 tháng 6, 2020

[PLESK] Cancel a stuck task in Plesk

Canceling a stuck task in Plesk for Linux

  1. Connect to the Plesk server via SSH.
  2. plesk db dump > /root/psa_dump.sql
  3. Find stuck process(es):
    plesk db "SELECT id,type,status,finishTime FROM longtasks WHERE status <> 'done'"

    +----+-----------------------------+---------+---------------------+
    | id | type                        | status  | finishTime          |
    +----+-----------------------------+---------+---------------------+
    56 | ext-wp-toolkit-task\install | started | 0000-00-00 00:00:00 |
    +----+-----------------------------+---------+---------------------+
  4. Delete the task from the longtasks table using id from step 3:
    plesk db "DELETE FROM longtasks WHERE id=56"
  5. Delete entries from the longtaskparams table using id from step 3:
    plesk db "DELETE FROM longtaskparams WHERE task_id=56"
  6. Kill the stuck process:
    pkill task-async-executor
    Note: In case tasks keep getting stuck after performing the above actions, clear the lock manager using the below commands:
    service sw-engine stop
    # rm -rf /var/lock/lmlib/container_locks
    # rm -f /usr/local/psa/var/cache/*
    # service sw-engine start


Canceling a stuck task in Plesk for Windows Server

  1. Connect to the Plesk server via RDP.
  2. C:\> plesk db dump > C:\psa_dump.sql
  3. Find stuck process(es):
    C:\> plesk db "SELECT id,type,status,finishTime FROM longtasks WHERE status <> 'done'"

    +----+-----------------------------+---------+---------------------+
    | id | type                        | status  | finishTime          |
    +----+-----------------------------+---------+---------------------+
    56 | ext-wp-toolkit-task\install | started | 0000-00-00 00:00:00 |
    +----+-----------------------------+---------+---------------------+
  4. Delete the task from the longtasks table using id from step 4:
    C:\> plesk db "DELETE FROM longtasks WHERE id=56"
  5. Delete entries from the longtaskparams table using id from step 4:
    C:\> plesk db "DELETE FROM longtaskparams WHERE task_id=56"

Không có nhận xét nào: