diff --git a/src/mail_templates/oom_event.ejs b/src/mail_templates/oom_event.ejs index 7659e3488..48c23a6ba 100644 --- a/src/mail_templates/oom_event.ejs +++ b/src/mail_templates/oom_event.ejs @@ -2,9 +2,9 @@ Dear <%= cloudronName %> Admin, -<%= program %> has bee restarted now as it ran out of memory. +<%= program %> was restarted now as it ran out of memory. -Should this message appear repeatedly or undefined behavior is observed, give the app more memory. +If this message appears repeatedly, give the app more memory. * To increase an app's memory limit - https://cloudron.io/documentation/apps/#increasing-the-memory-limit-of-an-app * To increase a service's memory limit - https://cloudron.io/documentation/troubleshooting/#services diff --git a/src/mailer.js b/src/mailer.js index 4b4c88f69..d611f37dd 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -493,7 +493,7 @@ function oomEvent(mailTo, program, event) { from: mailConfig.notificationFrom, to: mailTo, subject: util.format('[%s] %s was restarted (OOM)', mailConfig.cloudronName, program), - text: render('oom_event.ejs', { cloudronName: mailConfig.cloudronName, program: program, event: event, format: 'text' }) + text: render('oom_event.ejs', { cloudronName: mailConfig.cloudronName, program: program, event: JSON.stringify(event), format: 'text' }) }; sendMails([ mailOptions ]); diff --git a/src/notifications.js b/src/notifications.js index 36e29479c..8555f468e 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -196,7 +196,7 @@ function oomEvent(eventId, app, addon, containerId, event, callback) { program = addon.name; title = `The ${addon.name} service ran out of memory`; message = 'The service has been restarted automatically. If you see this notification often, consider increasing the [memory limit](https://cloudron.io/documentation/troubleshooting/#services)'; - } else { + } else { // this never happens currently program = containerId; title = `The container ${containerId} ran out of memory`; message = 'The container has been restarted automatically. Consider increasing the [memory limit](https://docs.docker.com/v17.09/edge/engine/reference/commandline/update/#update-a-containers-kernel-memory-constraints)';