Ash FrameworkAF
Ash Framework7mo ago
16 replies
Ahrou

Cinder.Table count timeout not working as expected

Hey @sevenseacat i saw that there was a new version with fixes for the timeout and this issue was closed (https://github.com/sevenseacat/cinder/issues/7)

But i'm still getting the same error even when setting the query_opts={[timeout: :timer.seconds(20)]}
11:52:17.499 [error] Task #PID<0.16899.0> started from #PID<0.16897.0> terminating
** (stop) exited in: Task.await(%Task{mfa: {:erlang, :apply, 2}, owner: #PID<0.16899.0>, pid: #PID<0.16900.0>, ref: #Reference<0.0.2163075.2654478720.718864387.182882>}, 5000)
    ** (EXIT) time out
    (elixir 1.18.4) lib/task.ex:888: Task.await_receive/3
    (ash 3.5.23) lib/ash/actions/read/read.ex:3205: Ash.Actions.Read.maybe_await/1
    (ash 3.5.23) lib/ash/actions/read/read.ex:654: anonymous fn/8 in Ash.Actions.Read.do_read/5
    (ash 3.5.23) lib/ash/process_helpers.ex:38: anonymous fn/4 in Ash.ProcessHelpers.async/2
    (elixir 1.18.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.18.4) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: #Function<0.98117759/0 in Ash.ProcessHelpers.async/2>
    Args: [] { }


Idk how exactly the count is handled in Cinder but in Ash there is a way to automatically ask for count? Im trying to understand how it reaches the function in the stack trace, there is a Task.await without opts so that is where the timeout 5000 is coming from, these defaults https://hexdocs.pm/elixir/Task.html#await/2
Solution
I can fix that
Was this page helpful?