Closed williamff11 closed 3 years ago
What is your Elixir and db_connection versions?
Elixir: 1.10.4 db_connection: 2.3.1
Ok, so the reason this is happening is because the sandbox is a single connection shared by all of your task async streams. So if you have a lot of task async stream, they will fight over the same connection and eventually they will time out checking it out. You can increase the queue_target and queue_interval for your test environment in your repo configuration OR reduce the task async stream concurrency during test (or both).
Hello! I have a Task.async_stream() called inside of a Multi.run. When this Task.async_stream() is called, a error is hurled:
But, when I call this Task.async_stream() outside Multi.run, the code runs successfully.