The database connections are using too much memory. #892

Open
opened 2026-03-04 11:14:59 -05:00 by deekerman · 1 comment
Owner

Originally created by @chrisleell on GitHub (Apr 11, 2025).

Originally assigned to: @dariamarutkina on GitHub.

During my usage, the service encountered an out-of-memory error.

Image

Upon analyzing the memory, I found three WebSession objects, each occupying over 200 MB of memory.

Image

The TableCache under PostgreSchema contains a large number of PostgreTableRegular objects.

Image

Image

The PostgreSQL database I am using has over 300,000 tables, views, and other elements.

It appears that each connection loads all the elements in the database, resulting in significant memory consumption.

Is this implementation reasonable? Can it be optimized?

Originally created by @chrisleell on GitHub (Apr 11, 2025). Originally assigned to: @dariamarutkina on GitHub. During my usage, the service encountered an out-of-memory error. ![Image](https://github.com/user-attachments/assets/2203e29f-4593-4ba1-bc51-fb2923735f69) Upon analyzing the memory, I found three WebSession objects, each occupying over 200 MB of memory. ![Image](https://github.com/user-attachments/assets/8ea5a4e2-4973-49af-bf33-1f13c04a6865) The TableCache under PostgreSchema contains a large number of PostgreTableRegular objects. ![Image](https://github.com/user-attachments/assets/12c980ac-a03f-4175-b177-8ff1fad3567b) ![Image](https://github.com/user-attachments/assets/313601fc-7025-4250-8b5e-c13120dc50d8) The PostgreSQL database I am using has over 300,000 tables, views, and other elements. It appears that each connection loads all the elements in the database, resulting in significant memory consumption. Is this implementation reasonable? Can it be optimized?
Author
Owner

@dariamarutkina commented on GitHub (Apr 17, 2025):

Hello @chrisleell !
Please try to select a filter by databases\schemas\tables in the UI so that fewer tables are loaded when opening.
Image
We are still thinking about a more optimal solution.
Thank you for the report 🦫

@dariamarutkina commented on GitHub (Apr 17, 2025): Hello @chrisleell ! Please try to select a filter by databases\schemas\tables in the UI so that fewer tables are loaded when opening. ![Image](https://github.com/user-attachments/assets/296fac61-ca85-4311-a8ad-925e344ba067) We are still thinking about a more optimal solution. Thank you for the report 🦫
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#892
No description provided.