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

Insufficient memory creates unlogged 60 second delays. Increasing memory resolves it. #1535

Open
RyanPaiva56 opened this issue Feb 10, 2025 · 1 comment

Comments

@RyanPaiva56
Copy link

Horizon Version

5.30.2

Laravel Version

11.41.3

PHP Version

8.4.3

Redis Driver

PhpRedis

Redis Version

2.3

Database Driver & Version

No response

Description

This is 100% reproducible. I'm using Laravel 11 Sail using horzion/redis. If you use the default horizon.php config settings, eventually, your queue will just start getting funky in the following ways:

  1. All queued jobs will take exactly 1 minute before the next job starts.
  2. Chained job busses will only run the first job.

For instance, if i queue up 1000 jobs that take 10ms each, each job will complete and show in horizon as being "done" successfully and having taken 10ms. Then horizon will just sit there for exactly 1 minute and then run the next job, which will work perfectly, then wait again.

If you then increase your memory from the default 64 to 256, the queue will instantly go back to working properly. This took me wayyyy too long to figure out.

I also checked through the code here on GH for horizon and didn't see anything that would create the delay.

Steps To Reproduce

  1. Use Laravel sail.
  2. Leave the default memory limit in place in horizon.php.
  3. Queue up a bunch of stuff.
  4. Queue will begin to only work 1 minute at a time.
  5. Increase your memory limit and the queue will go back to being fast again.
Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

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

2 participants