My project is broken. [Nothing saves]

Can’t edit anything, and sometimes, when trying to use FS to create a new file, it says out of disk space.
Here are my container stats.
image
The project name is Altricatia. Only viewable by me and Glitch staff.

Seems odd, could you try remixing the project? That often helps and fixes and issues with your current project

Hi @Aprixia,

Thanks for reaching out! Even though you have not surpassed the disk space limit, it looked like your project may have come close a few times. When that happens, you can have trouble getting any edits you made to stick.

To help you, I’ve given your project additional disk space for 24 hours. This should give you the room needed to:

  1. Add files that are taking up too much space to .gitignore
  2. Move database files that get rewritten often to .data

Once you have done this, run the following commands in the project console:

git prune and hit enter
git gc and hit enter.
refresh and hit enter

This should free up the space you need to get future edits to stick. If you have any questions, let us know!

Thank you very much, @tasha <3

Ok so, I have no idea how to use .gitignore
I’ve just read 6 different docs on it, but I just can’t seem to figure out how to use it.

It’s very simple, for example if you had a file or folder called test
It’s as simple as adding
./test
To the file (seperating new entries with a new line)

If its a file include the extension

Ok so, I’ve just found out that my project contains of ~200mbs of active databases, and ~50mbs commands. This leaves me with nothing that can be removed. If it’s ok, I would like to request the ability to have the extra storage until Thursday next week, which is when I’ve gotten my pay and can then afford a VPS for this project. As I have noticed in the past, that the project has gotten too big. So I am just waiting for my pay, so that way I will be able to afford a VPS with the specs my project needs. Glitch is a great free host, but the storage, CPU, and memory, just isn’t enough for large projects. So yeah. Though, I can’t have my project down for more than 3 days, as that will break the DevRules of top.gg.

Hi @Aprixia,

We can only provide 24 hours of temp disk space.

Do you have a .data file that you can store your active databases in? EDIT If you do this, then rewrites of those files wont be used for version control.

I see. How would I use a .data file?

Hi @tasha :slight_smile:

Is this a recent change? In the last couple of months I’ve had files in .data count towards the disk space allowance.

There is a hidden folder called .data, which is ignored by git, so when anything in there changes it doesn’t contribute to the version control, thus avoiding additional disk space usage by versions. It also means it isn’t included in “rewind” operations.

The editor doesn’t show any file or folder ignored by git. To “see” it you’d need to use the console, and use linux commands like

ls .data
2 Likes

@mishavee, so can I move my .SQLite database into the .data folder and it won’t count towards my total disk space?

The project has just gotten suspended. So I will be unable to put the databases inside the .data folder like this.

And at the same time, I am now unable to download my project to transfer it to a VPS.
If you can’t give me more storage for a few hours again, then please move my databases folder into the .data folder, and I’ll handle the code fixes myself when I can.

Can’t you just make a git ignore and put
nameofdb.sqlite
Inside it? Easiest way ATM without any effort

I tried that with my databases, and it made my databases inaccessible to the rest of the project.

??? What do you mean? It only hides it from your view, and from githubs view but completely accessible to the whole project. Git ignore doesnt have any relation to your project, its simply a git component to prevent sensitive files such as config files from being seen by git

Hence the name, git ignore, makes git ignore files

Well, I was unable to access my template database (databases/global.json) through eval(); and normally, I can access it through that.

With regards to the database likely being tracked by version control (in this case, Git), I suggest you do the following once you regain access to your project:

  1. Move the database to the hidden .data folder. Files inside the folder will not be tracked by version control (in this case, Git).
  2. Tell Git to run its garbage collection script on the repository via git gc --aggressive --prune=now.
  3. Remove any occurrences of the database in the commit history to free up space. To do so, run git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch <file>" HEAD, where <file> was the path to the SQLite file where you kept it before (so, for example, if you never moved it, the path would just be the filename).

You may or may not want to run the garbage collection step again after freeing up space. I suspect git filter-branch leaves a lot of mess behind when it cleans things out.

@tasha
Sorry for bumping, but I need to get this solved quickly.