Scheduled rebooting memory leak

maximilianvbHOBBY

a year ago

Hi, it would be nice with scheduled rebooting if possible to combat memory leak in backend. Yes it's not optimal to have a memory leak but it's a very small leak I'm trying to debug in the meantime I want to reboot the backend once a day.

0 Replies

a year ago

thanks for sharing your usecase!


a year ago

this template was made with your exact use case in mind -


a year ago

n/a


maximilianvbHOBBY

a year ago

thanks


a year ago

let me know if you run into any difficulties


maximilianvbHOBBY

a year ago

Hi, I tested this out but for me it did not work as planned


maximilianvbHOBBY

a year ago

it's a bit hard to debug because I don't know what part I've done wrong


maximilianvbHOBBY

a year ago

it's not clear from the instructions if I need to use your template or not it says this:

"Once the bookmarklet has been added to your bookmark bar, open your Railway project and desired service,"

What do you mean desired service? The Railway Cron service or something else?


maximilianvbHOBBY

a year ago

I think it would make more sense in your instructions to put the "deploy this template" first because it I put the schedule_1 and stuff like that in my other service


you could also do it in code. I'm also doing a restart once a day with a cron job

node+nestjs

@Cron('0 8 * * *', {
  timeZone: constants.worker.timezones.iceland,
})
async restart() {
  await this.railwayService.restart(RailwayServices.api);
}

restart() {
  await this.axiosService.post(this.config.url, {
    headers: {
      Authorization: `Bearer ${this.config.apiKey}`,
      'Content-Type': 'application/json',
    },
    data: {
      query: `
        mutation DeploymentRestart($id: String!) {
          deploymentRestart(id: $id)
        }
      `,
      variables: { id },
    },
  });
}

a year ago

this is exactly what the service I made does.


a year ago

have you read the templates overview?
I thought I did a pretty good job at explaining every little detail needed to deploy it


maximilianvbHOBBY

a year ago

seems to work now


maximilianvbHOBBY

a year ago

as a railway beginner i didn't understand you had to deploy the template


a year ago

uhhh well i would have never imagined id need to tell you to deploy the template


a year ago

can you help me understand the thought process behind being able to use a template without ever deploying it?


maximilianvbHOBBY

a year ago

I don't know I must be stupid


maximilianvbHOBBY

a year ago

i thought I would make it myself by following the text and skip the template


maximilianvbHOBBY

a year ago

I never used CRON before so this might add to the confusion. I followed everything in the text, I put the schedule_1 and token on my service variables for the thing I wanted to restart


maximilianvbHOBBY

a year ago

anyway I don't think there is much to improve in the instructions, it comes from inexperience with both railway and cron on my side


a year ago

sounds good, so you did get it to work in the end?


maximilianvbHOBBY

a year ago

yes


a year ago

awsome, and i always wanna hear peoples usecase for it, would you mind sharing?


a year ago

same as this threads title?


maximilianvbHOBBY

a year ago

ye


a year ago

cool, thanks for sharing


maximilianvbHOBBY

a year ago

thanks


Scheduled rebooting memory leak - Railway Help Station