Skip to content

Commit 4155e09

Browse files
committed
fix: large message crashes SubscribersNotification
`handle_call/3` has a default timeout of 5s. Large messages (e.g. inserting 1 million rows) may take longer that this, which causes the GenServer to crash. Set it to `:infinity` instead.
1 parent 4b1cc04 commit 4155e09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/realtime/subscribers_notification.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule Realtime.SubscribersNotification do
1010
Send notification events via Phoenix Channels to subscribers
1111
"""
1212
def notify(txn) do
13-
GenServer.call(__MODULE__, {:notify, txn})
13+
GenServer.call(__MODULE__, {:notify, txn}, :infinity)
1414
end
1515

1616
@impl true

0 commit comments

Comments
 (0)