Announcement

Collapse
No announcement yet.

Job "Check Personal Email Accounts" got stuck at "Pending"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Job "Check Personal Email Accounts" got stuck at "Pending"

    Hi! Yesterday I added a couple of custom fields, and the job "Check Personal Email Accounts" got stuck at "Pending" for all email accounts. More info:

    1) For last 1.5 years we actively sent and received emails via EspoCRM and the same mail server and never had any problems
    2) Direct log-in to the mail server shows that it receives emails, has free space and everything seems to be OK
    3) The problem is not related to any specific email or email account, because I tried disabling all existing accounts and creating a new one linked to a real email account with a couple of test emails - it doesn't sync as well (stuck at Pending)
    4) "Test Connection" for all existing and new email accounts returns "OK"
    5) It must not be related to the changes I made yesterday, because I reverted them and tested everything again to no avail
    6) Absolutely no errors at /var/www/html/crm/data/logs/, only unrelated warnings
    7) All other jobs work properly, move to "Success" and so on

    Please advise me what other things can be checked to identify and solve the problem

  • #2
    Hello,
    check if you have any job with status Running
    run php cron.php in terminal and check if you get any error

    Comment


    • #3
      8) Sending emails from CRM works, the problem is only with retrieving emails from email accounts

      Comment


      • #4
        Thank you for your response!

        There are no Running jobs.

        `php /var/www/html/crm/cron.php` returns nothing

        Comment


        • #5
          Check now the Log of Check Personal Email Accounts. Do you have Pending in the past?

          Comment


          • #6
            In the Jobs section I do see Pending in the past. If I delete them, new ones appear after a couple of minutes and get stuck at Pending again even until the "Execute at" time has past long ago. For each email account two consecutive jobs appear and get stuck. New ones are created only if I delete the previous ones

            In the Check Personal Email Accounts log page I see only Success jobs, the latest being two days ago.

            Comment


            • #7
              Did you do any server configuration or software upgrade? Please check if you have enabled PHP imap.
              Job Offers and Requests

              Comment


              • #8
                No, I didn't do any server configuration or software updates.

                Today I added a couple of logs to ScheduledJob.php and CronManager.php and found out that all the pipeline within $this->getCronJob()->getPendingJobList() is stuck with one Scheduled Workflow Job that for some unknown reason ran for tens of thousands of entities at the same time two days ago. I didn't touch this workflow then and I didn't mass change the entities (apart from adding unrelated custom fields), and it used to strike for a couple of entities per day (as planned) for several months before that. This workflow is last modified by System - I don't know which modification it was.

                Anyway I disabled the workflow and removed all the pending Jobs related to it - the pipeline of Pending jobs started decreasing and I hope it will reach Check Personal Email Accounts after several hours and emails will continue to be imported into EspoCRM. If it works, I will inform you here.

                Sorry for confusing you in the beginning: some of the Jobs did convert to Success, but apparently not all of them, and that was the root cause.

                Comment


                • #9
                  Do you use the latest EspoCRM 5.0.5?
                  Job Offers and Requests

                  Comment


                  • #10
                    No, it's still 4.8.2. We need to update our PHP version first, so upgrade is delayed for some time.

                    Comment


                    • #11
                      Sorry for the late update - the solution described above worked, and everything has been ok since then.

                      Comment

                      Working...
                      X