surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.08k stars 82 forks source link

Bug: Out of memory after submitting long queries #491

Open Xkonti opened 4 days ago

Xkonti commented 4 days ago

Describe the bug

For testing I'm pasting-in a 1.1 million lines long queries and execute then through Surrealist. After sending one or 2 queries like that, surrealist keeps soft-crashing with an out-of-memory message:

image

This continues to happen after a restart, possibly due to the queries still being in the query history (and trying to render the whole thing).

Steps to reproduce

Here's the code that generates said 165MB query: https://github.com/Xkonti/surreal-benchmarks/blob/main/benchmarks/select_simple.ts

Expected behaviour

No slowdowns of Surrealist, possibly showing a warning that the query won't be present in the query history due to it's size.

Surrealist Environment

Can't get to the settings because Surrealist keeps crashing, but I remember it's v3.0.4 on Windows 11

Contact Details

ben@xkonti.tech

Is there an existing issue for this?

Code of Conduct

macjuul commented 3 days ago

Hey! I have been working on improvements to the query history drawer in this PR after watching one of your previous streams 😄 Hopefully that will improve memory usage as a result