R
Railway2y ago
Piero

Automatic project redeploys?

I have a project running that seems to have a memory leak which I cannot track down nor fix. Is there any way to have a project redeploy every few days or so automatically?
4 Replies
Percy
Percy2y ago
Project ID: 7dd5f953-95e3-4530-8fdb-7f4311228dd4
Piero
PieroOP2y ago
7dd5f953-95e3-4530-8fdb-7f4311228dd4
Brody
Brody2y ago
seen this question a few times, the answer was always have your app crash itself after x amount of time the other option would be call the public api and use the deploymentRestart mutation, for the id input it requires use the environment variable RAILWAY_DEPLOYMENT_ID do either of those options in an in-code cron job
rando
rando2y ago
Memory leak as a feature mildpanic There's also https://blog.railway.app/p/cron-jobs-django-github-actions if you want the cronjob to live outside your code. The CLI doesn't support a "restart" though (it probably should?)
Want results from more Discord servers?
Add your server