Closed DRMacIver closed 5 months ago
Wow, I have no idea how that was ever supposed to work. The best kind of backpressure: it just crashes your program if the queue gets too long. The default max queue length is 10000 so I'm not surprised it only shows up under load.
You can specify a different length as an argument to open_loop()
. I bet open_loop(math.inf)
will solve your problem. It's kind of silly to accept a limit at all; the asyncio methods to enqueue callbacks are synchronous so there's no way to enforce backpressure if the queue fills up.
When running redispy's asyncio support on top of trio-asyncio, we occasionally see the following error:
I'm afraid I don't have anything resembling a reproducible test case for this - sorry. It's a thing that we hit occasionally in a production run, and I have no idea how to produce it reliably on our systems, let alone produce a simple test case. I suspect it's something to do with the scale we're running at.