hasura / hasura/graphql-engine

Sudden increase in Postgres connections

Open
#7,700 2 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 1.3.3

### Environment

Azure AKS cluster, on Azure managed Postgres

### What is the expected behaviour?

Our Postgres instance started to suddenly receive a lot of new connections from Hasura. It increased suddenly from around 40 to around 500. When it reached the maximum connections count it started throwing errors for any new connection attempts from Hasura.
Other findings:
- No http request increase was observed to Hasura
- In the first 5 minutes of the issue, the Hasura containers restarted and logged the following errors:

It looks like there were multiple logs written to the output at the same time, which makes it hard to understand what they mean (screenshot below).

### Keywords

Postgres,connections

### What is the current behaviour?

The incident stopped by itself after around 2h.

### How to reproduce the issue?

No idea

### Screenshots or Screencast

![image](https://user-images.githubusercontent.com/7516063/137868389-a1f077c9-0726-43d6-a7f5-e3a68c88e37e.png)

### Please provide any traces or logs that could help here.

On the screenshot

### Any possible solutions?

No idea

### Can you identify the location in the source code where the problem exists?

No idea

### If the bug is confirmed, would you be willing to submit a PR?

Sure

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is identified. Start by reviewing the attached screenshot and the reported restart and connection logs, then trace Hasura's connection handling against Azure managed Postgres. Done requires a reproducible explanation for the jump from about 40 to 500 connections and a verified fix or documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.