hasura / hasura/graphql-engine

Impossible to use console, "run_sql" queries hangs Postgres (cpu 100%)

Open
#10,123 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: 2.35.1
CLI Version (for CLI related issue): -

### Environment

OSS

### What is the current behaviour?

It's impossible to use the Hasura console. Every action taken hangs the PostgreSQL database, causing it to reach 100% CPU usage, and it becomes impossible to do anything. Currently, we have 220 tables and 13 schemas, and it's not possible to work.

### What is the expected behaviour?

That it works correctly, that it is fast, and that actions are instantaneous or, at the very least, quick.

### How to reproduce the issue?

Create a database with 10 or 20 schemas and around 200 or 300 tables with permissions and relationships among them. Then try to create a column, change a unique key, or perform any other action.

### Screenshots or Screencast

![Captura de pantalla 2024-02-01 a las 12 02 21](https://github.com/hasura/graphql-engine/assets/9481003/38e30f91-9c43-416f-aa56-273cd579ee45)

![image](https://github.com/hasura/graphql-engine/assets/9481003/d70ea670-7118-49f0-97b7-e451035bfa5f)

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

### Any possible solutions/workarounds you're aware of?

Change metadata system...

### Keywords

console, metadata, postgres

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through the Hasura console's run_sql path against PostgreSQL with roughly 10–20 schemas and 200–300 tables, including permissions and relationships. Monitor PostgreSQL CPU usage while creating columns, changing unique keys, and performing other actions; done means these actions complete without hanging the database or causing sustained 100% CPU usage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.