Problem: every Workflow sendEmail fire generates multiple emails being sent. Clients receive up to several dozens emails at once when there should be only 1.
It started when we added a custom extension to crm/custom/Espo/Custom/Modules/Advanced/Core/Workflow/Actions/SendEmail.php and changed "From" field in all workflows to a custom parameter that is not a valid email. The new "SendEmail.php" is basically all the parents' functons and a simple script that inserts a value from a field in a linked Opportunity to a "From" field. It's only 20 rows so I can paste it here if you need it.
It must have slowed down the whole sending-email-from-workflow sequence. So my guess is that when workflow does not get a success response in a limited period of time, it restarts from scratch, and that's how multiple actions are generated. The question is - how to stop it without reverting custom SendEmail.php? We may develop the same function some other way, but ultimately we need it.
Additional info:
The CRM version is still 4.8.2, Advanced Pack is 1.24.0 We understand that an update may fix the issue, but it takes time, so we are in search of a quicker fix.
In CRM logs there are multiple rows like this:
[2018-05-29 12:07:18] Espo.ERROR: CronManager: Failed job running, job [5b090c90a0178f203]. Error Details: Workflow[590b1c7551cbd7ed6]: Action failed [sendEmail] with cid [0]. [] [] with different job and workflow ids.
`php /var/www/html/crm/cron.php` returns nothing
There are a lot of Pending jobs in the past, but my guess it's a consequence rather than a reason. Duplicate emails appeared several days ago, while jobs started to get stuck yesterday - I think too many of them start to be created and retried so they don't have time to be executed and get stuck.
Please help!
It started when we added a custom extension to crm/custom/Espo/Custom/Modules/Advanced/Core/Workflow/Actions/SendEmail.php and changed "From" field in all workflows to a custom parameter that is not a valid email. The new "SendEmail.php" is basically all the parents' functons and a simple script that inserts a value from a field in a linked Opportunity to a "From" field. It's only 20 rows so I can paste it here if you need it.
It must have slowed down the whole sending-email-from-workflow sequence. So my guess is that when workflow does not get a success response in a limited period of time, it restarts from scratch, and that's how multiple actions are generated. The question is - how to stop it without reverting custom SendEmail.php? We may develop the same function some other way, but ultimately we need it.
Additional info:
The CRM version is still 4.8.2, Advanced Pack is 1.24.0 We understand that an update may fix the issue, but it takes time, so we are in search of a quicker fix.
In CRM logs there are multiple rows like this:
[2018-05-29 12:07:18] Espo.ERROR: CronManager: Failed job running, job [5b090c90a0178f203]. Error Details: Workflow[590b1c7551cbd7ed6]: Action failed [sendEmail] with cid [0]. [] [] with different job and workflow ids.
`php /var/www/html/crm/cron.php` returns nothing
There are a lot of Pending jobs in the past, but my guess it's a consequence rather than a reason. Duplicate emails appeared several days ago, while jobs started to get stuck yesterday - I think too many of them start to be created and retried so they don't have time to be executed and get stuck.
Please help!
Comment