Announcement

Collapse
No announcement yet.

How to get rid of 17GB in db table workflow_log_record?

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

  • How to get rid of 17GB in db table workflow_log_record?

    Because of an error in one cron entry, a workflow got executed way too often and produced unnoticed 17GB of data in the db table "workflow_log_record". How can one get rid of this data? Would it be safe to empty the table? Or is there an other preferred way to clean up log entries?

  • #2
    Hi there,
    If you have EspoCRM v.5.8.3+ and Advanced Pack v.2.5.2+ then there should be a Cleanup job that should automatically delete Workflow Log Records. Period of this job is 2 months. Also, you are able to decrease this period in the /data/config.php file (e.g. 'cleanupWorkflowLogPeriod' => '7 days',).

    If your EspoCRM or Advanced Pack versions are less then pointed above, you can clear this log manually by clearing the 'workflow_log_record' table.

    Comment


    • #3
      you can also truncate the table in phpmyadmin or in a custom php script or use a command to run the scheduled job manually
      Last edited by tothewine; 11-13-2020, 01:21 PM.

      Comment


      • #4
        Maximus it looks like 'cleanupWorkflowLogPeriod' works for deleting workflow log records, thanks.

        Currently, I am looking at how can I clean 'scheduled_job_log_record' table. This table is enormously large and I cannot find any settings on how to change the clean-up period.

        Do you have any suggestions on how to set scheduled_job_log_record clean-up period let's say to 1 month?

        Comment


        • #5
          Laimonas You can go to Administration -> Scheduled Jobs -> Clean-up and the change the Scheduling to your needs.

          Comment


          • #6
            AgentT In the UI it says "Success" (see the picture attached), but when I check my 'scheduled_job_log_record' table I can see that no records were deleted, all logs from February are there, 300k+ log records...
            Did you try to open your PHPMyAdmin and check if any of your log records in the 'scheduled_job_log_record' table are deleted?
            Attached Files

            Comment


            • #7
              Oh yes. The job does not clear the old entries. I'll have to debug the code and check what's happening. Unfortunately I'm currently caught up with other stuff. Will look into this a little later.

              Comment

              Working...
              X