-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay in fetching emails from O365 #4227
Comments
Try to increase Fetching Interval in "Manage > Settings > Mail Settings". Try to increase the sleep time between connections in https://github.com/freescout-help-desk/freescout/blob/dist/app/Console/Commands/FetchEmails.php#L101. Try 100000, 200000 and so on. |
Thank you for the input. I increased to 5 seconds and that does help a lot. The fetch interval time is set for 5 minutes. Since the connection sleep time increased to 5 seconds, I noticed that the new mails got fetch at a random interval, sometime within 5 minutes, sometime within 15 minutes. Should I increase the sleep time more to keep the fetch time within 5 minutes of arrival? |
No. Few seconds (5 seconds) is more than enough. Now try to decrease connection sleep time: 4 seconds, 3 seconds, 2 seconds, 1 seconds and less and check how it goes. |
… connection setup failed error - closes #4227
Try to update FreeScout to the latest version and try this /app/Console/Commands/FetchEmails.php file and let us know the results. |
Thank you for the advice. I have forwarded everything to the dev. I will update the status next week once the dev reply back. |
so my dev replaced the FetchEmails.php file to this one this morning. I have been monitoring one of the mailboxes, and the email fetching is still delayed. In one instance where it's 15 minutes delay, in another instance there are 3 emails came in to the mailbox around 5-10 minutes apart but on FS those 3 emails got fetch at the same time which is almost 10 minutes from the last received email, like emails came in at 1451, 1455, 1504, got fetch on FS at 1512. And another instance where for almost an hour, no email was fetched till I do manual fetch. |
It's not quite clear what you are saying. Are you still receiving "Error: connection setup failed" errors?
This looks like whole another story. Again logs need to be checked. |
should I change these values to increase more time? const MAX_SLEEP = 500000;
$sleep += 20000;
|
I'm still experiencing the fetching delay with mailboxes on FS. Please provide assistance. |
Try to increase this sleep value: https://github.com/freescout-help-desk/freescout/blob/dist/app/Console/Commands/FetchEmails.php#L144 and |
I changed the values according to the advice. I will post an update tomorrow. |
Try to set |
Made this change, and so far still no improvement.
Just made the change, will update tomorrow. |
after this change and also increased resources on the MySQL database, as of now the fetching seem to be normal, continue to monitor for the rest of today, will update again tomorrow |
Ok. Can you also try to with the previous |
so, everything is still good from my last reply, unfortunately I'm not able to reverse MySQL resources, so your request can't be done, thank you very much for all your advises, much appreciate. |
Try to return |
… connection setup failed error - closes #4227
I'm not a programmer/developer, so please don't roast me for trying to figure out why lately there's been a delay in fetching emails to all 30 mailboxes that we have. The delay time could be from 1 hour - 2 hours, I changed the fetch interval to 3 minutes, but nothing changed. When I do manual fetch, sometimes it fetches on the first or I have to do a second fetch. Every time I do manual fetch and got new emails, on the fetch log, I get this error message for all mailboxes.
Error fetching email | Error: connection setup failed; File: /var/www/xxxxxxxxxxxx/vendor/webklex/php-imap/src/Client.php (391)
Fetching emails setting:
IMAP
outlook.office365.com
993
OAuth credential
TLS
PHP version: 8.2.10
FreeScout version: 1.8.139
Database: MySQL
Are you using CloudFlare: Yes
Are you using non-official modules: No
When there's only a few mailboxes, there's no issue with delay. Is it because there's so many mailboxes that created the delay issue? If that's the case, what can I do to fix the delay for all mailboxes? All advises are welcome. Thank you in advance.
The text was updated successfully, but these errors were encountered: