Exception trace:
() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Infrastructure/Message/Zend/ImapMessageProvider.php:85
Diamante\EmailProcessingBundle\Infrastructure\Message\Zend\ImapMessageProvider->fetchMessagesToProcess() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Model/Service/MessageProcessingManager.php:56
Diamante\EmailProcessingBundle\Model\Service\MessageProcessingManager->handle() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Api/Impl/EmailProcessingServiceImpl.php:67
Diamante\EmailProcessingBundle\Api\Impl\EmailProcessingServiceImpl->process() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Command/GeneralEmailProcessingCommand.php:32
Diamante\EmailProcessingBundle\Command\GeneralEmailProcessingCommand->execute() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:846
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:189
Symfony\Component\Console\Application->doRun() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/desk-application/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45
JMS\JobQueueBundle\Console\Application->doRun() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:120
Symfony\Component\Console\Application->run() at /var/www/html/desk-application/app/console:23
`
The cron was getting initiated every 5 minutes while the existing email processing was on going. So we created a file based locking mechanism to prevent this parallel execution.
Hi , We were having the following issue while running email processing cronjob
`
[Diamante\EmailProcessingBundle\Model\MessageProcessingException]
cannot read - connection closed?
Exception trace: () at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Infrastructure/Message/Zend/ImapMessageProvider.php:85 Diamante\EmailProcessingBundle\Infrastructure\Message\Zend\ImapMessageProvider->fetchMessagesToProcess() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Model/Service/MessageProcessingManager.php:56 Diamante\EmailProcessingBundle\Model\Service\MessageProcessingManager->handle() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Api/Impl/EmailProcessingServiceImpl.php:67 Diamante\EmailProcessingBundle\Api\Impl\EmailProcessingServiceImpl->process() at /var/www/html/desk-application/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Command/GeneralEmailProcessingCommand.php:32 Diamante\EmailProcessingBundle\Command\GeneralEmailProcessingCommand->execute() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:256 Symfony\Component\Console\Command\Command->run() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:846 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:189 Symfony\Component\Console\Application->doRun() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/desk-application/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45 JMS\JobQueueBundle\Console\Application->doRun() at /var/www/html/desk-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:120 Symfony\Component\Console\Application->run() at /var/www/html/desk-application/app/console:23
`
The cron was getting initiated every 5 minutes while the existing email processing was on going. So we created a file based locking mechanism to prevent this parallel execution.
File location :: "/vendor/diamante/email-processing-bundle/Diamante/EmailProcessingBundle/Command/GeneralEmailProcessingCommand.php "
Modification :
` protected function execute(InputInterface $input, OutputInterface $output) {