Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Discard postgres connections periodically to free memory #16

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

jberryman
Copy link
Contributor

A workaround for hasura/graphql-engine#5087

@0x777
Copy link
Member

0x777 commented Jun 17, 2020

@jberryman My concern with this workaround is that it might affect majority of our users negatively. This is based on my assumption that most of our users probably don't have a workload where their response sizes are in the order of MBs (and increasing over time).

If we have to include such a workaround, this parameter has to be configurable and the default has to be that the connection is not forcefully closed every 'x' seconds.

@jberryman jberryman force-pushed the 5087-discard-stale-pg-conns branch from 33e5aa0 to afde08a Compare June 18, 2020 17:56
@jberryman jberryman force-pushed the 5087-discard-stale-pg-conns branch from afde08a to b526847 Compare June 18, 2020 18:05
@jberryman
Copy link
Contributor Author

@0x777 we now make this configurable like in --timeout with the default to no stale timeout.

most of our users probably don't have a workload where their response sizes are in the order of MBs (and increasing over time).

I'm not sure the best default. All it requires to trigger the behavior is:

  • a relatively active server
  • an occasional huge result set

@jberryman
Copy link
Contributor Author

Linking the main PR which depends on this : hasura/graphql-engine#5089

@0x777 0x777 merged commit a681fac into master Jun 24, 2020
@i-am-tom i-am-tom deleted the 5087-discard-stale-pg-conns branch June 24, 2022 14:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants