Skip to content

Commit

Permalink
5087 libpq pool leak (hasura#5089)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jberryman authored and codingkarthik committed Jul 28, 2020
1 parent 28ff27d commit e88668a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion server/cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ package graphql-engine
source-repository-package
type: git
location: https://github.com/hasura/pg-client-hs.git
tag: 70a849d09bea9461e72c5a5bbde06df65aab61c0
tag: cbfc69b935d19dc40be8cdcc73a70b81cf511d34

source-repository-package
type: git
Expand Down
7 changes: 0 additions & 7 deletions server/graphql-engine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ common common-all
TypeFamilyDependencies
TypeOperators

-- ApplicativeDo BangPatterns BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable
-- DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingVia EmptyCase
-- FlexibleContexts FlexibleInstances FunctionalDependencies GeneralizedNewtypeDeriving
-- InstanceSigs LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude
-- OverloadedStrings QuantifiedConstraints QuasiQuotes RankNTypes RecordWildCards ScopedTypeVariables
-- StandaloneDeriving TemplateHaskell TupleSections TypeApplications TypeFamilies TypeOperators

common common-exe
ghc-options:
-threaded -rtsopts
Expand Down
3 changes: 1 addition & 2 deletions server/src-lib/Hasura/Server/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ mkServeOptions rso = do
iTime <- fromMaybe 180 <$> withEnv i (fst pgTimeoutEnv)
connLifetime <- withEnv cl (fst pgConnLifetimeEnv)
allowPrepare <- fromMaybe True <$> withEnv p (fst pgUsePrepareEnv)
-- The connLifetime is being used by the new pg-client-hs, uncomment it below
return $ Q.ConnParams stripes conns iTime allowPrepare --connLifetime
return $ Q.ConnParams stripes conns iTime allowPrepare connLifetime

mkAuthHook (AuthHookG mUrl mType) = do
mUrlEnv <- withEnv mUrl $ fst authHookEnv
Expand Down

0 comments on commit e88668a

Please sign in to comment.