apache / apache/texera

Postgres max connection error on heavy load

Open
#3,525 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

## Issue
Postgres stop accepting new connections after the number of connections exceed its maximum. Therefore, all services (including computing unit) start to fail because of losing database connection.

## Symptoms
After test conducted on Jul 2 with 62 computing unit each 2 cores and 8 GB memory, we started to receive errors that Postgres has reached its maximum number of connections.

## Possible solutions
- Scale Postgres pods horizontally by adding more pods
- Increase number of allowed connections

## Error message
`2025-07-02 23:09:57.285 GMT [1152835] FATAL: sorry, too many clients already
Wed, Jul 2 2025 4:10:05 pm
2025-07-02 23:10:05.214 GMT [1152859] FATAL: sorry, too many clients already
Wed, Jul 2 2025 4:10:05 pm`

![Image](https://github.com/user-attachments/assets/6238b73f-305c-4be8-bdc2-011a2625af33)

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by reviewing how Postgres connection limits and pod scaling are configured, then reproduce the heavy-load scenario; done means services continue operating without “too many clients already” errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres
Domain
databases, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.