hasura / hasura/graphql-engine
Sudden increase in Postgres connections
- 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

### 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
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