AnsweredAssumed Answered

How to optimize InboundEmail?

Question asked by Francesca Shiekh on Sep 4, 2014
Latest reply on Sep 18, 2014 by Francesca Shiekh
SugarCRM 6.5.15 Pro (soon to be 6.5.17)

This has been a problem for a good long while, no solution in sight so I need your help.

We have a dozen email addresses that create Cases.
Each is set up as an InboundEmail queue.
Reception and processing of email works but it is extremely slow.
I have had to change some scheduler settings to make it work:
$sugar_config['jobs']['min_retry_interval'] = 10;

$sugar_config['jobs']['max_retries'] = 5;

$sugar_config['jobs']['timeout'] = 3600;

The Check Inbound Mailboxes scheduler is set to run every 2mins but runs for 30mins at a time.

Even with our relatively high load of inbound emails (~90emails/hr) it should not take 30mins to process them.

Additionally, when I go to the Emails module I can see that each queue has over 70,000 emails in the inbox. It's like the emails from all time are in there... So it takes an absurd amount of time to pull up the email in the first place.

Caveat:

we did customize InboundEmail.php to set some custom fields, unset the assigned_user_id (we don't want cases to be assigned). There is nothing so overwhelming that would take hours to process. Even the checks on the custom BlackList module don't take long at all.

Support can't help because of the customizations, though they did try to give me some answers. I was told the right way to not assign cases is to create a group with no users and have that as the queue's group but I don't want that because the group determines the settings for the department, and other fields, that are set in the case. 

Each department has someone reviewing the unassigned cases and assigning them to the appropriate people. Should I assign them all to id = '1' just to have something in there?

All my attempts at debugging this slowness have been futile, there are no long-running queries on the database server, no delays on the mailserver side that I can see so it must be the processing in the scheduler that is slowing things down or hanging up somewhere... but where?

Any thoughts?

FrancescaS

Outcomes