Hard to say 100% without real code, but my suspicion is that the Task ends up sharing a database connection with the GenServer, then brutal_killing the Task leaves the connection in an unusable state.
Hard to say 100% without real code, but my suspicion is that the Task ends up sharing a database connection with the GenServer, then brutal_killing the Task leaves the connection in an unusable state.