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


#1

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.


#2

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


#3

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


#4

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


#5

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


#6

@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


#7

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.


#8

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


#9

@etamponi :point_up:


#10

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.


#11

@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
} ```

#12

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.


#13

@Gareth

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


#14

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


#15

@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


#16

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.