Debugging obscure process crashes?

I believe I’ve found the cause of the request stalls: Postgrex is exiting in the client.

SELECT count('*') FROM (SELECT se0."id" AS "id" FROM "events" AS se0 LEFT OUTER JOIN "subscribers" AS ss1 ON ss1."id" = se0."subscriber_id" WHERE (ss1."user_id" = $1) LIMIT $2) AS s0 [1, 10001]
[info] Sent 200 in 41ms
[info] Postgrex.Protocol (#PID<0.548.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.9955.4> exited

Not sure what’s causing it. A Google search says there might be trouble with some plugs. I’ll check my scustom plugs and see if I’m doing anything crazy.

UPDATE: I’m getting tons of Postgrex.Protocol client exits, not sure what’s going on – the local server seems to completely crash and hangs all requests.

I’m not doing any particularly long-running queries. Is there any way to get further stacktraces for these exits?