Announcement

Collapse
No announcement yet.

Scheduled Jobs - Clean-up job Failed

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

  • Scheduled Jobs - Clean-up job Failed

    Hello,
    Job: Clean-up always has status: Failed.
    The biggest problem is that after Cron tries to execute Job: "Clean-up", the job "process Pending Flows" stops as well.
    Do you have any suggestions how to fix it?

  • #2
    Hi,
    How this issue described in the EspoCRM log?
    Do you have only the problem with the "Clean-up" job?

    Comment


    • #3
      I tried to start Job today at 7.30.

      The log file in DEBUG mode looks like attached: I do not see any error in it regarding this task.
      Attached Files
      Last edited by Enju; 06-28-2022, 05:34 AM.

      Comment


      • #4
        Hello,

        application/Espo/Jobs/Cleanup.php. do this

        $this->cleanupJobs();
        $this->cleanupScheduledJobLog();
        $this->cleanupAttachments();
        $this->cleanupEmails();
        $this->cleanupNotifications();
        $this->cleanupActionHistory();
        $this->cleanupAuthToken();
        $this->cleanupAuthLog();
        $this->cleanupUpgradeBackups();
        $this->cleanupUniqueIds();
        $this->cleanupDeletedRecords();

        comment one and execute : php command.php run-job Cleanup
        if good, repeat with other , comment one and execute .. so you can find where is failled.

        Comment


        • #5
          Thanks for the suggestions item and thanks to you I solved the problem. I encountered a problem doing: cleanupNotifications:
          Code:
          PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes)
          I deleted the records directly from the database and since then the CleanUp Job has been executed.

          Comment


          • #6
            The cleanup command doesn't work for me either.
            When performing cleaning, such an error:

            Code:
            Error: Job 'Cleanup' failed to execute. SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
            I can't change mysql settings - the application works on a regular hosting

            It was possible to find out that the problem is in the task
            Code:
            $this->cleanup Attachments();
            More than 12,000 files have accumulated in the /data/upload folder

            Is there a way to make the task of cleaning attachments work?​

            Comment


            • #7
              Hi,
              maybe, test at your risk:

              go to admin/attachments : set primary filter : Orphan
              delete all find



              or modify this some data and try :


              run cleanUp job manually
              remove manually deleted record ( sql delete from ..where deleted=1 )




              Comment

              Working...
              X