Page 3 of 3

Re: Cron error periodically

Posted: Mon Feb 17, 2020 6:56 pm
by Klemen
That's an error returned by PHP's built-in IMAP functions.

The only thing that comes to my mind is that the mail server is too busy and sometimes the connection hangs (either through POP3 or IMAP).

Re: Cron error periodically

Posted: Wed Feb 19, 2020 1:04 am
by hesker
Now I'm periodically getting my old friend...

<h2>An error occured.</h2><p>For details turn <b>Debug mode</b> ON in settings and run this script again.</p>

But of course with debug on, there will never be any error.

Re: Cron error periodically

Posted: Wed Feb 19, 2020 3:07 pm
by hesker
Incidentally, I also do NOT receive a notice on every run of Cron now that debug is disabled. I get notices only on errors.

Re: Cron error periodically

Posted: Wed Feb 19, 2020 8:11 pm
by Klemen
It's normal that you only get emails on errors with debug mode turned off because Hesk returns no output (so no Cron email notifications) on success.

Can't help with the connections being dropped by the mail server though other than try a different mail provider.

Re: Cron error periodically

Posted: Fri Feb 21, 2020 3:58 pm
by hesker
That logic doesn't make sense to me. If I enable debug, I will never, ever, get an error. But if I disable debug, I get errors numerous times per week, sometimes numerous times per day. If the mail server was in fact just randomly dropping sometimes, I would expect to see it also fail with debug enabled, but it doesn't.

Re: Cron error periodically

Posted: Fri Feb 21, 2020 6:30 pm
by Klemen
But you DID get an error with debug mode ON as well, see your post on previous page:
<pre>Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate)</pre>
Perhaps it's just harder to spot the error because you get 288 emails per day if the cron job is run every 5 minutes?


Either way - I am not going to be dragged into an argument here. If you don't trust me, please hire a developer for help.

Re: Cron error periodically

Posted: Sat Feb 22, 2020 4:08 pm
by hesker
That was with debug off. See the post right before that one where I turned it off.

I'm not arguing, I'm simply reporting what is happening. As for "too many emails" when running every minute, I still opened and read every single one. Also I had slowed it down to every 10 minutes so it really wasn't that hard to manage at all.

Re: Cron error periodically

Posted: Sat Feb 22, 2020 7:26 pm
by Klemen
"<pre>" marked errors only get printed with Debug mode on...

Based on what I have seen and read, my conclusion is that the mail server is unreliable and sporadically drops connections. I provided at least two options on how you can explore this further. Unfortunately, I can't provide any further help regarding this issue.

Re: Cron error periodically

Posted: Sat Feb 22, 2020 7:30 pm
by hesker
OK. I don't know what to tell you but debug mode was off when that message arrived.

I have again contacted the host to investigate, but most likely they will simply say the issue is in the script and to talk to you, since that's what they've been saying all along. And frankly since the error doesn't ever occur with debug mode enabled, I'm inclined to agree with them.

But oh well.