fix(memory-leak): Resetting app after 8 hours

This commit is contained in:
Chris Troutner
2021-09-07 20:58:23 -07:00
parent 36476b32ab
commit 0963f89049
+7
View File
@@ -94,6 +94,13 @@ class Server {
// Attach the other IPFS controllers
await controllers.attachControllers(app)
// ipfs-coord has a memory leak. This app shuts down after 8 hours. It
// expects to be run by Docker or pm2, which can automatically restart
// the app.
setTimeout(function () {
process.exit(0)
}, 60000 * 60 * 8)
return app
} catch (err) {
console.error('Could not start server. Error: ', err)