[RESOLVED] Planned downtime to upgrade servers from 4:00AM to 5:00AM Eastern Time, December 21

Hello everyone,

we are going to deploy a non-backward compatible change to our servers on December 21. During the deploy, which should last around 30 minutes, the projects won’t be accessible.

3 Likes

Good thing I’ll be sleeping then! :wink:

2 Likes

The deploy is over, we are checking if everything works normally.

will the project run without logging in glitch i mean every time you update my project shut’s down and sometimes i m busy and i don’t know so can you do something about this

Hi @gco360 :slight_smile:

we can’t keep free projects running forever if not used. You can use external services to auto-ping your projects from the outside

@etamponi im using express to ping my project the only time my project shut’s down is when you’ll update glitch and it does not start again

yes, you’d need to use an external service to ping your project. Most of our deploys will leave your project running (we deploy several times a day), but from time to time we need to also shut down running projects. In that case, you either restart it manually or you use an external service to restart it.

do you know any project which will restart my bot after any updates

@etamponi :point_up:

Be sure to use a http request from a third party service like uptime robot or setcronjob to wake your bot, rather than using something like a setTimeout() to ping your own project. This project uses such a method.

1 Like

@Gareth im using this to ping my bot

const http = require('http');
const express = require('express');
const app = express();
app.get("/", (request, response) => {
  console.log(Date.now() + " Gco Ping Received");
  response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
  http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
}, 280000);```

and i use this as watch.json 

```js
{
  "install": {
    "include": [
      "^package\\.json$",
      "^\\.env$"
    ]
  },
  "restart": {
    "exclude": [
      "^public/",
      "^dist/"
    ], 
    "include": [
      "\\.js$",
      "\\.json"
    ]
  },
  "throttle": 900000
} ```

Yes, so the setInterval() is pinging your own project and won’t recover after restarts. Use the GET route you’ve got above, hitting it with use of a 3rd party web cron service or uptime service like uptimerobot and it’ll work even after restarts.

1 Like

@Gareth

should i use a code from this project https://glitch.com/edit/#!/twitterbot-autorespond

Even if the project in the link below is made especially for discord bots, but the specific page can be used for any project over glitch.
https://thelearneer.gitbooks.io/discord-js-glitch-hosting/247-bot-uptime.html

1 Like

@Froosty that means i can remove express and all that so no need to have a code which will ping my bot if i use uptime robot and should i delete watch .json and express or ill make it ping my bot every 24 hrs and use express and watch.json

watch.json doesn’t have anything to do with keeping your project running, it controls what types of edits cause your project to restart/reload. If you remove it, the project will go back to the default behavior. You can remove express if you don’t need to handle web requests, or if you’re doing it some other way.

1 Like