sqlite-viewer-vscode icon indicating copy to clipboard operation
sqlite-viewer-vscode copied to clipboard

Could not Open .DB File More than 2GB

Open Feriolet opened this issue 1 year ago • 5 comments

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

Feriolet avatar May 20 '24 04:05 Feriolet

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?

qwtel avatar May 20 '24 15:05 qwtel

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.

Feriolet avatar May 21 '24 03:05 Feriolet

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.

qwtel avatar May 27 '24 03:05 qwtel

Oh okay, thanks for the clarification!

Feriolet avatar May 30 '24 06:05 Feriolet

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.

piranna avatar Sep 09 '24 09:09 piranna

Same problem.

Try use DBeaver instead of a VScode plugin. :)

chenkigba avatar Jun 11 '25 06:06 chenkigba