yiisoft / yiisoft/yii2-queue

yii\db\Exception: Packets out of order. Expected 1 received 0

Open
#456 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.1k
Forks
285
Avg merge
5d 3h
Merged PRs (30d)
2

Description

What steps will reproduce the problem?

Succesfully run a heavy job (about 10-20 mins)

What's expected?

Job is released (row is deleted from DB table)

What do you get instead?

yii\db\Exception: Packets out of order. Expected 1 received 0 at this point
https://github.com/yiisoft/yii2-queue/blob/master/src/drivers/db/Queue.php#L226

Also after this error Yii2 Queue is trying to execute the job once again though canRetry() method always return false.

Additional info
Q A
Yii version 2.0.45
PHP version 7.4.3
MySQL version 8.0.28
Operating system Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/drivers/db/Queue.php around line 226 and reproduce the reported failure after a 10–20 minute job using the listed Yii, PHP, and MySQL versions. Trace the packet-order exception and the subsequent retry behavior; done means the job is released as expected and is not retried when canRetry() returns false.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.