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
[5.2]Multi projects use queue on redis, if failed job the record go across the database. #14403
Comments
You need to change the prefix in config/cache.php for the projects. When creating a queue the cache system is used and it uses a namespace using this prefix, just change the prefix in both or either one of the project and the problem will be resolved. NOTE: |
Rather than using a prefix, I'd definitely recommend using separate redis databases. Out of the box redis gives you 16, indexed 0->15. By default, laravel will select database 0. |
Thanks all. With different redis, it would not be happened again. |
@GrahamCampbell per your suggestion , I'v solve the problem, thanks. And thank @maxgaurav , I use prefix to database too. Seconds ago, I had updated the answer on https://stackoverflow.com/questions/38494053/laravel-5-2-multi-projects-use-queue-on-redis-if-failed-job-the-record-go-acros/38508731#38508731 |
@GrahamCampbell @ac1982 Unfortunately, the creator of Redis strongly recommends against using that "database" feature and says it was his worst idea: https://stackoverflow.com/a/36498590/470749 I'm still struggling to find a solution for using Redis for queues for multiple Laravel applications on a single server (like this person). |
I have two project on same server (Ubuntu 16.04) with different database, username and also different user_password.
But if A project's queue failed, it may insert into B project's failed-job table.
I checked the Laravel config all with default setting.
I use the supervisor keep walker.
So, anybody has the same problem and a solution for that?
The text was updated successfully, but these errors were encountered: