Digest emails not getting sent
-
Is there a way to manually kick it off?
-
There probably should be a way, as this seems to be a common problem.
-
Also, I noticed when chatting with one of my moderators that he was posting chats in the "future." E.g., for a little bit the time estimate would say, "a few moments from now."
Is that because his clock was ahead, my clock is behind, or, more importantly, it's a problem on the server?
And to bring it back, does that affect the cron and digest emails getting sent? -
Yeah it sounds like either your clock or the server's clock is unsynchronized.
Edit: such an issue could affect it, but only if it's a big difference
-
The other possibility that I eliminated was running NodeBB with forever vs. the nodebb command.
-
@baris I put in some winston.info messages and nothing is getting set to the logs. I guess I'll try console.log next.
-
-
@baris Yup, that's the first spot I put a winston log message.
Where do console.log messages end up? Also the logs?
-
Yes if you are starting nodebb with
./nodebb start
everything should go inlogs/output.log
if you are starting with./nodebb dev
you should see them in terminal.If it's not printing it the next step would be to check if jobs are started at all, put a log here to see if it's printed.
-
Probably irrelevant ... I explored the code that sets 'runJobs' ... I'm not running as a cluster. Here's my config.json
{ "url": "https://www.axisandallies.org/forums", "secret": "redacted", "database": "mongo", "port": "80", "trust_proxy": true, "mongo": { "host": "redacted.ip.address.here", "port": "27017", "username": "nodebb", "password": "redacted", "database": "nodebb" } }
-
@djensen47 said in Digest emails not getting sent:
Okay, it printed out in the logs.
So jobs are getting started then but never triggering, try a log here https://github.com/NodeBB/NodeBB/blob/master/src/user/jobs.js#L44. If you get it cron is definitely setup.
If they are not run maybe has some time setup issue.
-
For some reason, the digest was sent today. All I've done since last time was upgrade to 1.11.0.
-
Actually, only a few went out and they went out at the wrong time. I have it set for 17:00 and they were sent at 9:00.
-
Hi @djensen47
I had a similar issue, and found out it was related to email throttling.
The mail server rejected most of the digests, as they came in too fast.
If this is your issue, there is a solution, but it needs to be integrated into the main code.
Follow my comments here:
https://github.com/NodeBB/NodeBB/issues/6911Good luck!
JJ. -
I ran into a similar issue this weekend when the digest tried to run.
The issue that I have is that SparkPost automatically adds emails to a restricted list when they bounce or get reported. When NodeBB attempts to send a message to one of these email addresses, an error is thrown and at some point the whole process stops sending. In addition to throttling, it would be nice to ignore the email failures like this and continue.
-
@baris If I change the cron job to run the weekly on a different day (today) and it's been less than a week since the last attempt (Sunday), will the people who were already sent a weekly digest (on Sunday) be sent another weekly digest? I don't want to spam those first 1000 people.
-
Darn, that makes debugging difficult. I guess I'll file a bug with the errors that stopped the digest send.