Skip to content

Commit 9513a1c

Browse files
jberrymancodingkarthik
authored andcommitted
5087 libpq pool leak (hasura#5089)
Shrink libpq buffers to 1MB before returning connection to pool. Closes hasura#5087 See: hasura/pg-client-hs#19 Also related: hasura#3388 hasura#4077
1 parent 63971d7 commit 9513a1c

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

server/cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ package graphql-engine
4343
source-repository-package
4444
type: git
4545
location: https://github.com/hasura/pg-client-hs.git
46-
tag: 70a849d09bea9461e72c5a5bbde06df65aab61c0
46+
tag: cbfc69b935d19dc40be8cdcc73a70b81cf511d34
4747

4848
source-repository-package
4949
type: git

server/graphql-engine.cabal

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ common common-all
7171
TypeFamilyDependencies
7272
TypeOperators
7373

74-
-- ApplicativeDo BangPatterns BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable
75-
-- DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingVia EmptyCase
76-
-- FlexibleContexts FlexibleInstances FunctionalDependencies GeneralizedNewtypeDeriving
77-
-- InstanceSigs LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude
78-
-- OverloadedStrings QuantifiedConstraints QuasiQuotes RankNTypes RecordWildCards ScopedTypeVariables
79-
-- StandaloneDeriving TemplateHaskell TupleSections TypeApplications TypeFamilies TypeOperators
80-
8174
common common-exe
8275
ghc-options:
8376
-threaded -rtsopts

server/src-lib/Hasura/Server/Init.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ mkServeOptions rso = do
183183
iTime <- fromMaybe 180 <$> withEnv i (fst pgTimeoutEnv)
184184
connLifetime <- withEnv cl (fst pgConnLifetimeEnv)
185185
allowPrepare <- fromMaybe True <$> withEnv p (fst pgUsePrepareEnv)
186-
-- The connLifetime is being used by the new pg-client-hs, uncomment it below
187-
return $ Q.ConnParams stripes conns iTime allowPrepare --connLifetime
186+
return $ Q.ConnParams stripes conns iTime allowPrepare connLifetime
188187

189188
mkAuthHook (AuthHookG mUrl mType) = do
190189
mUrlEnv <- withEnv mUrl $ fst authHookEnv

0 commit comments

Comments
 (0)