Random (usually daily) package reinstalls

Hello, I’ve noticed that all my packages get reinstalled almost everyday (sometimes twice). How do I stop this from happening?

Just noticed that they usually reinstall at 3 am lol so weird

1 Like

3 am what time zone?

Est lol (20chars20chars)

Glitch restart your projects when you enter or leave. Being afk would turn off the project, refreshing that page would startbit.

what? Did you read the title of the post? It’s about package reinstalls not the project turning off.

That is why it installs the packages.

Why does it turn off if its boosted?

Glitch does this with all project you don’t have to worry

I’m not worried, I’m annoyed. I pay for the project to be always online and when the packages are reinstalling it’s not.

For one thing, it’s to deploy updates to the non-app part of the project containers. There may be other purposes such as rearranging projects onto different host computers.

1 Like

This could not possibly be true since it happened WHILE I was editing a project

If the project is boosted and is offline due to reinstalling packages every time, doesn’t this defeat the purpose of paying for boosted apps? I’m kinda confused about this myself.

There are no Boosted only servers.

Not for all use cases. It’s probably better for projects that are fast to install their dependencies.

How does this benefit the users or developer if the site is down meanwhile? Also if a new version is installed it may not be compatible with the current code. This may result in the application stop working due to not being compatible with the latest revisions of the library API. :face_with_raised_eyebrow:

Recently I asked a question about how the packages are stored. I was told that it was a directory shared between containers. So these package installs would most likely be due to this.

I see two potential benefits, which are:

  1. The project is kept online between these reinstalls, compared to unboosted projects, which go to sleep. But I don’t think you forgot about this quality of boosted projects, so I don’t understand why you’ve asked.
  2. Reinstallation would be done eagerly, so if a project isn’t being accessed at that time, the next access after reinstallation would be fast. In an unboosted project, I think the reinstallation wouldn’t happen until the next access, and that access would have to wait for the reinstallation, and the user would have to wait longer.

A agree with this. I have two things to add here:

  1. Unboosted projects are also subject to the same updates. The only way they’d have fewer updates is if they sleep all the way through an entire version of the container image, but that’s not particularly relevant.
  2. Glitch’s official support for nodejs has led to practices that help insulate projects from compatibility problems. The default package manager uses lockfiles so that reinstallations use the same versions of app dependencies, while reinstalling allow the dependency code to be rebuilt so that they properly link with whatever new stuff is in the new container image.

I think the OP stated it was happening twice a day, even when he was editing the project.

This is the confusing part cause it sounds like it the project is being taken offline more then needed. I’m not a seasoned NodeJS developer but, how often do NodeJS packages get updated? Also what’s the node_modules folder for then?

Yeah, I recall seeing that about “twice a day.” There’s normally time in between reinstalls though. I personally have projects where it takes far, far less than 12 hours to install projects, and I think that’s closer to the usual case.

Reinstalls while editing a project could be a result of bad luck. Or it could be a change to the files that are supposed to trigger a reinstall, such as package.json for Node.JS projects.

1 Like