Beanstalkd retrying non retryable job
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.1k
- Forks
- 285
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
class DummyJob extends BaseObject implements RetryableJobInterface
{
public function execute($queue): void
{
sleep(5);
}
public function getTtr(): int
{
return 1;
}
public function canRetry($attempt, $error): bool
{
return false;
}
}
If I push such job to queue I expect it to fail due Ttr and not to be retried.
However due how beanstalkd works it just puts job back to queue many times ignoring canRetry()
Any fix. Or should I use different driver?
I use beanstalkd because mysql driver can't handle the load :D
P.S. this is related to
2025-03-15 09:09:11 [-][-][-][error][Pheanstalk\Exception\ServerException] Pheanstalk\Exception\ServerException: Cannot delete job 754021: NOT_FOUND
This issue also produces such errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the issue with the shown DummyJob and its beanstalkd queue configuration, then trace the retry and deletion handling around TTR failures and the reported Pheanstalk NOT_FOUND error. Done means a non-retryable TTR failure is not returned to the queue and does not produce the deletion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100