From e3726b0f97018ddd2d7cbb2a788671c7163acbd1 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 8 Aug 2022 09:34:04 +0200 Subject: [PATCH] log flushed pool retry --- src/PostgREST/AppState.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PostgREST/AppState.hs b/src/PostgREST/AppState.hs index ead1848b79..69d258ee2f 100644 --- a/src/PostgREST/AppState.hs +++ b/src/PostgREST/AppState.hs @@ -118,7 +118,9 @@ usePool appState@AppState{..} session = do Just p -> do res <- SQL.use p session case res of - Left SQL.PoolIsReleasedUsageError -> usePool appState session + Left SQL.PoolIsReleasedUsageError -> do + logWithZTime appState "Attempted to used flushed pool, retrying" + usePool appState session _ -> return res -- | Flush the connection pool so that any future use of the pool will