Error with Redis ingest, Queue recorder and Bus::batch()
Closed this issue · 2 comments
Pulse Version
1.4.1
Laravel Version
12.14.1
PHP Version
8.2.18
Livewire Version
3.6.3
Database Driver & Version
No response
Description
When the following requirements are met:
- Pulse is configured to use Redis (no cluster) as ingest driver
- The Queue recorder is enabled
- An action (e.g. console command) calls
Bus::batch()with more thanPULSE_INGEST_BUFFERjobs
Then the following error occurs:
Redis::pipeline(): Can't activate pipeline in multi mode!
This is because Bus::batch() internally calls pipeline(transaction($bulk)) but with Pulse active inside $bulk, pipeline() is called by RedisIngest again, causing the error.
I'm happy to work on this, provide example code or send a PR but after investigating this issue for a couple of days with different behavior in my prod/dev setups I just can't think of a solution right now 😕
Steps To Reproduce
See requirements above. I don't have exact steps but I can try to create an example repo that reproduces the issue if you want.
It occurred to me that one solution could be to configure different Redis connections for the queue and the Pulse ingest. By default, both the queue and Pulse use the same connection. Maybe there could be a warning about this in the docs?
Going to close this one, as we have a workaround as suggested in your latest comment.
Not against having the docs updated to include a warning about this.