Having an issue with the disk

Project lin : http://glitch.com/~better-whatsapp

My disk is full and I can’t modify the files.

I somehow managed to empty the server.js file by mistake… But that isn’t the best part of the problem, just gotta use rewind for this one.

I’m working on a project which is basically whatsapp in a browser using quick.db and socket.io (with express, http, and all the rest of course)

Yesterday I added a system which allows users to upload a picture into the json.sqlite database managed by quick.db. The picture arrives in the server as an ArrayBuffer and is sent to the user and decrypted into an Base64 picture data.

The Array Buffer just takes too much place for Glitch to store a lot of them, so the pictures took a lot of disk space and it went full this morning.

I decided to use git console commands to reduce the size yesterday, it worked, but I couldn’t use it this morning as it was showing an error message saying that there wasn’t enough disk space and the project now cannot be modified without reloading the glitch page (not just the project)

Before it was softlocked, I tried deleting the image data using db.delete('variablethatcontainsthepicture');
and
db.set('variableblablabla', [ ]);
and also
db.set('variableblablabla', '');
but it was not lowering the disk space… But the pictures were entirely gone.

2 questions :
Is there a way to store efficiently pictures in this type of file ?
Is the a way to unsoftlock the project ?

@SebPautot Yes, There is a way! @glitch_support can unsuspend the project and give you extra space for 24 hours to run your commands!

1 Like

Thank you, I saw that in an other post but I wanted confirmation, just what I needed !
Do you have an idea about the other question tho ?

Unfortunately, I’m not really sure how to do that. Other members of the Glitch Community can help you out with this question!

1 Like

Thank you anyway, I greatly appreciated your help !

Your very welcome! Happy to help the Glitch Community!

Hi @SebPautot

I’ve given your project additional disk space for 24 hours. This should give you the room needed to add files that are taking up too much space to .gitignore .

If you haven’t done so already, you can also move any database files to .data for space saving and security.

Once you have done this, you can run git prune & git gc

1 Like

Thanks for the help, greatly appreciate !

.data works like .gitignore I guess ?

Yes — All data in .data isn’t rewindable, just like things in .gitignore.

1 Like

yeah so the file’s name should be just “.data” or does it still work after I add something before .data ? I don’t know that much about .gitignore so I don’t know for sure where I’m going yet. Plus it looks like a file with just “.data” cannot be created unlike “.gitignore”

Btw I typed the command lines and I’m now at 3% (after my disk space was x9) so it should be around 27% of a normal disk space.

Basically put your file in the .data folder. The .data folder doesn’t show up in the editor.

im having the same problem
here https://glitch.com/edit/#!/koalaknightmi-bible-quiz2
even though i have since removed several files

Thank you I tried that out but it turns out quick.db doesn’t find the file and creates a new one… Sadly I’m not able to use it rn, but I’ll do some research and I’ll probably find out how to do that correctly.

Try something like one of these, which works depends on how your app is started and structured

".data/mydatabase.db"
"/app/.data/mydatabase.db"
1 Like

Hello I have the same problem help me pls the name is these 1-botneutr0 pls help me