qwtel / sqlite-viewer-vscode

A quick and easy SQLite viewer for VSCode, inspired by DBBrowser for SQLite and Airtable.
https://marketplace.visualstudio.com/items?itemName=qwtel.sqlite-viewer
Other
167 stars 13 forks source link

Could not Open .DB File More than 2GB #57

Open Feriolet opened 4 months ago

Feriolet commented 4 months ago

Hello!

I am currently having a problem where I could not open a .db file that has a size of more than 2GB with the SQLite Viewer on VSCode. I was wondering if this is a VSCode issue or the SQLite Viewer extension issue, and if there is a way to solve this. Thanks!

Error:

The editor could not be opened due to an unexpected error: RangeError [ERR_FS_FILE_TOO_LARGE]: File size (7463473152) is greater than 2 GiB
qwtel commented 4 months ago

There's currently nothing you can do unfortunately. For various reasons the extension is working with an in-memory copy of the file and 2GB seems to be the hard limit for what an extension is allowed to allocate in your case.

To help me determine if an update to the extension could solve your issue, could you better describe your use case? Are you using the desktop version of VSCode? Is the file on the same machine or are you connecting to a remote workspace (SSH, WSL, docker). Is the database an "archive" or are other processes actively writing to it?

Feriolet commented 4 months ago

I assume VSCode application on itself means that it is a desktop version. The file is on a remote server connected with SSH command. I'm not sure what do you mean by "archive", but yes the database is constantly updated with a python for loop script, with the conn.execute('UPDATE....') and conn.commit(). Even when there is no more processes updating, it still gives the same error.

qwtel commented 4 months ago

Thanks for clarifying. Unfortunately that is pretty much the worst case scenario for this extension. It can be solved in principle, but it would require rewriting significant parts of the extension, so not planned right now.

Feriolet commented 4 months ago

Oh okay, thanks for the clarification!

piranna commented 3 weeks ago

I assume VSCode application on itself means that it is a desktop version.

That's not true, VSCode is a webapp running on desktop using Electron, but the fact is that it can run on any browser too.