You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if metadata is reloaded, the active websocket connections are dropped and the consumers of the websocket connections are expected to reconnect to the graphql-engine. The websocket connections of the active subscriptions are dropped because the state of the metadata might have been updated and if the connections are not closed, then the subscriptions will still be running on the previous state of metadata.
The problem with the above is that while reloading metadata, the websocket connections are closed and then the clients re-open the connections, this leads to a huge spike in the number of postgres connections because the older websocket connection's postgres connections would not have been dropped and the new websocket connections will acquire new postgres connections. So, this means that there will be a temporary spike of postgres connections until the older connections are dropped.
Also, while this happens, a customer has noticed that the number of connections defined by HASURA_GRAPHQL_PG_CONNECTIONS and HASURA_GRAPHQL_CONNECTIONS_PER_READ_REPLICA are exceeded. Internal ticket Ref: https://hasurahelp.zendesk.com/agent/tickets/9743
Is your proposal related to a problem?
Currently, if metadata is reloaded, the active websocket connections are dropped and the consumers of the websocket connections are expected to reconnect to the graphql-engine. The websocket connections of the active subscriptions are dropped because the state of the metadata might have been updated and if the connections are not closed, then the subscriptions will still be running on the previous state of metadata.
The problem with the above is that while reloading metadata, the websocket connections are closed and then the clients re-open the connections, this leads to a huge spike in the number of postgres connections because the older websocket connection's postgres connections would not have been dropped and the new websocket connections will acquire new postgres connections. So, this means that there will be a temporary spike of postgres connections until the older connections are dropped.
Also, while this happens, a customer has noticed that the number of connections defined by
HASURA_GRAPHQL_PG_CONNECTIONS
andHASURA_GRAPHQL_CONNECTIONS_PER_READ_REPLICA
are exceeded. Internal ticket Ref: https://hasurahelp.zendesk.com/agent/tickets/9743Describe the solution you'd like
Provide an API to manually drop the active websocket connections instead of dropping the websocket connections on every metadata reload (this can be done by disabling https://hasura.io/docs/latest/deployment/graphql-engine-flags/reference/#close-websocket-connections-on-metadata-change), so the customer will have the choice when to close the active websocket connections.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: