Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The queue task was delayed in ttr seconds #438

Open
huangli58 opened this issue Oct 26, 2021 · 7 comments
Open

The queue task was delayed in ttr seconds #438

huangli58 opened this issue Oct 26, 2021 · 7 comments

Comments

@huangli58
Copy link

What steps will reproduce the problem?

I set parameter ttr=7200, seconds。
I found a strange phenomenon that the task was not wrong but it was executed after 7200 seconds.
My config like this:
'dataExport' => [
'class' => yii\queue\redis\Queue::class,
'channel' => 'dataExportQueue',
'as log' => common\behaviors\QueueLogBehavior::class,
'ttr' => 7200,
],

What's expected?

I guess it should execute immediately but I didn t get task feedback.

What do you get instead?

Additional info

@huangli58
Copy link
Author

Normally, the Queue were executed immediately and delayed only a few times.

@yii-bot
Copy link

yii-bot commented Oct 26, 2021

Thanks for posting in our issue tracker.
In order to properly assist you, we need additional information:

  • When does the issue occur?
  • What do you see?
  • What was the expected result?
  • Can you supply us with a stacktrace? (optional)
  • Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)

Thanks!

This is an automated comment, triggered by adding the label status:need more info.

@huangli58
Copy link
Author

When does the issue occur?
When I push a task to the queue it happens.

What do you see?
The task was not performed immediately.After 7200 seconds I found the update record in the database and I knew it was executed and I prepared to calculate the time it was executed after ttr seconds.

What was the expected result?
I expected it to execute immediately but it was not immediately and there was no relevant error.

Can you supply us with a stacktrace? (optional)

Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)

@samdark
Copy link
Member

samdark commented Oct 27, 2021

Does that happen with any task every time? In order to fix an issue we need to somehow reproduce it.

@huangli58
Copy link
Author

No.It is normal for a long time, occasionally such problems.I have no way to reproduce it either.

I'm not sure if this is related to supervisor as I use it as a process management for Yii Queue and the odd phenomenon is that when Queue was delayed after ttr seconds I found that supervisor restarted Yii Queue.

@samdark
Copy link
Member

samdark commented Oct 28, 2021

That should be connected.

@huangli58
Copy link
Author

Is there any good solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants