Clean-up Jobs are being Failed.

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Pablo
    replied
    Hi yuri ,

    I followed your instructions. At step #3 I had this error:

    Code:
    Fatal error: Call to undefined method PDOException::getRelationType() in /home2/linkport/public_html/crmlinkport/application/Espo/Jobs/Cleanup.php on line 415
    Looking at line 415 of Cleanup.php I see:

    if ($e->getRelationType($relation) !== 'manyMany') continue;

    Any ideas to fix it?

    Thanks a lot.

    Leave a comment:


  • item
    replied
    Hi,
    I see many post with scheduled job... before install pack, delete job and so ..
    but it's simple to make this kind of think : (I do with my skill)
    maybe out-of-box

    PHP Code:
    <?php
    namespace Espo\Custom\EntryPoints;
    class runSql extends \Espo\Core\EntryPoints\Base
    
    {
    
        public static $authRequired = true;
    
        public function run()
    
        {
    
            $pdo = $this->getEntityManager()->getPDO();
             $sql = "TRUNCATE TABLE job";
             $sth = $pdo->prepare($sql);
             $sth->execute();
             $sql = "TRUNCATE TABLE scheduled_job_log_record";
             $sth = $pdo->prepare($sql);
             $sth->execute();
        }
    }
    
    ?>

    Leave a comment:


  • yuri
    replied
    Weird. What you can try:

    1.Set clean up job scheduling to * * * * *.
    2. DIsable EspoCRM cron in crontab.
    3. Run cron manually in CLI php cron.php. Maybe you will need to run it twice with 1 minute interval.
    4. See what is printed in console.

    Leave a comment:


  • Pablo
    replied
    Hi yuri ,

    I found the following errors at the log files (for the specific day of the cleanup job). However, I don't think it's related to the cleanup issue:

    Code:
    [2019-02-02 19:27:37] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:27:37] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    [2019-02-02 19:27:38] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:27:38] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    [2019-02-02 19:27:51] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:27:51] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    [2019-02-02 19:35:40] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:35:40] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    [2019-02-02 19:35:53] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:35:53] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    [2019-02-02 19:56:25] Espo.ERROR: API [POST]:/LeadCapture/:apiKey, Params:Array (     [apiKey] => 5c55ee98e1800bb14 ) , InputData: {"test":true} - No appropriate data in payload. [] []
    [2019-02-02 19:56:25] Espo.ERROR: Display Error: No appropriate data in payload., Code: 400 URL: /crmlinkport/api/v1/LeadCapture/5c55ee98e1800bb14 [] []
    Any recommendations?

    Thanks a lot.

    Leave a comment:


  • yuri
    replied
    Hi Pablo,

    I think there must be something in data/log after a failed run.

    Leave a comment:


  • Pablo
    replied
    Hi yuri ,

    Thanks for your reply. Any other way we can fix this failed clean-up jobs? Or any other place/file we can check for errors?

    Thanks.

    Leave a comment:


  • yuri
    replied
    > Is there any way to execute the cleanup job manually?
    No. But you can change scheduling of your job.

    Deleting failed jobs shouldn't fix the problem.

    Leave a comment:


  • Pablo
    replied
    Hi Maximus

    Thanks for the help. I have deleted both failed job logs.

    Is there any way to execute the cleanup job manually? (or I have to wait until the end of this week? ).

    Thanks.

    Leave a comment:


  • Maximus
    replied
    Hi Pablo,
    yes, try to delete failed jobs manually.

    Leave a comment:


  • Pablo
    replied
    Hi Maximus ,

    Thanks for your reply. When I check the logs from the EspoCRM admin panel it just shows 2 failed jobs and 1 pending (check attached screenshot). The is no errors at the data/logs folder.

    Looking at your screenshots, do you recommend removing (deleting) the logs for the cleanup job?

    Thanks a lot.

    Leave a comment:


  • Maximus
    replied


    Originally posted by jscoder
    The Scheduled Clean-up Jobs are being failed.
    What about this error says in the Espo error log?
    Attached Files
    Last edited by yuri; 02-04-2019, 08:07 AM.

    Leave a comment:


  • Pablo
    replied
    Hi jscoder ,

    I'm having the same issue with failed jobs for clean-up (version 5.5.1).

    Were you able to fix it?

    Thanks.

    Leave a comment:


  • jscoder
    replied
    Originally posted by yurikuzn
    Hi,

    What versino of EspoCRM? Any errors in log?
    It's 5.4.3. But the issue is from the last 6 months.

    Leave a comment:


  • yuri
    replied
    Hi,

    What versino of EspoCRM? Any errors in log?

    Leave a comment:


  • jscoder
    started a topic Clean-up Jobs are being Failed.

    Clean-up Jobs are being Failed.

    Hi,

    Clean-up Jobs are not working. I have 6 months of Action History and it's making DB huge. The Scheduled Clean-up Jobs are being failed.

    Please help me fix this problem. Is there any way to run clean-up manually?
Working...