AF
Ash Framework•4mo ago
jasono

Ash.page resulting in ** (EXIT) no process: the process is not alive or there's no process currently

My paginated read query is failing with this error. This used to work fine, so I wonder if something changed with Ash.
17:13:23.603 [error] GenServer #PID<0.2666.0> terminating
** (stop) exited in: GenServer.call(#PID<0.2670.0>, {:get_and_update, #Function<0.88285443/1 in Ash.Actions.Read.AsyncLimiter.async_or_inline/4>}, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.18.3) lib/gen_server.ex:1128: GenServer.call/3
(ash 3.5.24) lib/ash/actions/read/async_limiter.ex:30: Ash.Actions.Read.AsyncLimiter.async_or_inline/4
(ash 3.5.24) lib/ash/actions/read/relationships.ex:81: Ash.Actions.Read.Relationships.fetch_related_records/5
(ash 3.5.24) lib/ash/actions/read/relationships.ex:26: Ash.Actions.Read.Relationships.load/4
(ash 3.5.24) lib/ash/actions/read/read.ex:359: Ash.Actions.Read.do_run/3
(ash 3.5.24) lib/ash/actions/read/read.ex:89: anonymous fn/3 in Ash.Actions.Read.run/3
(ash 3.5.24) lib/ash/actions/read/read.ex:88: Ash.Actions.Read.run/3
(ash 3.5.24) lib/ash.ex:2760: Ash.read/2
(ash 3.5.24) lib/ash.ex:2166: Ash.page!/2
17:13:23.603 [error] GenServer #PID<0.2666.0> terminating
** (stop) exited in: GenServer.call(#PID<0.2670.0>, {:get_and_update, #Function<0.88285443/1 in Ash.Actions.Read.AsyncLimiter.async_or_inline/4>}, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.18.3) lib/gen_server.ex:1128: GenServer.call/3
(ash 3.5.24) lib/ash/actions/read/async_limiter.ex:30: Ash.Actions.Read.AsyncLimiter.async_or_inline/4
(ash 3.5.24) lib/ash/actions/read/relationships.ex:81: Ash.Actions.Read.Relationships.fetch_related_records/5
(ash 3.5.24) lib/ash/actions/read/relationships.ex:26: Ash.Actions.Read.Relationships.load/4
(ash 3.5.24) lib/ash/actions/read/read.ex:359: Ash.Actions.Read.do_run/3
(ash 3.5.24) lib/ash/actions/read/read.ex:89: anonymous fn/3 in Ash.Actions.Read.run/3
(ash 3.5.24) lib/ash/actions/read/read.ex:88: Ash.Actions.Read.run/3
(ash 3.5.24) lib/ash.ex:2760: Ash.read/2
(ash 3.5.24) lib/ash.ex:2166: Ash.page!/2
read :read_recent do
pagination countable: :by_default, offset?: true, default_limit: 16
read :read_recent do
pagination countable: :by_default, offset?: true, default_limit: 16
11 Replies
ZachDaniel
ZachDaniel•4mo ago
This is either fixed in main or in the latest release I believe Please try and let me know
jasono
jasonoOP•4mo ago
Hmm.. tried both, but the issue persists.
ZachDaniel
ZachDaniel•4mo ago
Can you make a reproduction project showing the issue?
Jason
Jason•4mo ago
Okay. I will try.
jasono
jasonoOP•4mo ago
@Zach Daniel It appears that the error occurs when loading multiple relationships in each pagination request.
Ash.Query.for_read(Ticket, :paginated)
|> Ash.Query.limit(page_size)
|> Ash.Query.sort(priority: :desc, created_at: :desc)
|> Ash.Query.load([:events, :comments]). ## multiple relationship
Ash.Query.for_read(Ticket, :paginated)
|> Ash.Query.limit(page_size)
|> Ash.Query.sort(priority: :desc, created_at: :desc)
|> Ash.Query.load([:events, :comments]). ## multiple relationship
Let me know if this makes sense. If not, I will provide a link to the test project. Thanks.
ZachDaniel
ZachDaniel•4mo ago
Hmm...strange. A link to the project would be great. Just makes it that much easier for me 🙂
jasono
jasonoOP•4mo ago
Sure.
jasono
jasonoOP•4mo ago
GitHub
GitHub - puruzio/helpdesk
Contribute to puruzio/helpdesk development by creating an account on GitHub.
jasono
jasonoOP•4mo ago
mix run run_pagination_test.exs reproduces the error.
ZachDaniel
ZachDaniel•4mo ago
@jasono okay try main
jasono
jasonoOP•4mo ago
It's working. Thanks!

Did you find this page helpful?