Hi there,
Does anyone have an idea of how to purge/clean the job logs in the scheduler?
Clean Jobs Queue did triggered this morning but the job logs in the other schedulers are still there.
Any help would be appreciatedā¦
Calvin
Hi there,
Does anyone have an idea of how to purge/clean the job logs in the scheduler?
Clean Jobs Queue did triggered this morning but the job logs in the other schedulers are still there.
Any help would be appreciatedā¦
Calvin
go into the database,
The Clean Jobs Queue clears any jobs that may have gotten stuck in the queue it doesnāt clear the job logs.
run the query
update schedulers_times
set deleted = 1;
This will remove all the job logs.
Thanks
Lewis
Hi Lewis,
Thatās weird, I donāt have such a table in my database?
There is a link reference to this issue and yet I couldnāt find the mentioned function in Scheduler.php.
http://forums.sugarcrm.com/f3/schedulers_times-table-getting-pretty-big-9045/
Calvin
Appologies,
The table is job_queue.
update job_queue
set deleted = 1 where status = ādoneā;
Thanks
Lewis
Hi Lewis,
When I select the job_queue table, it shows an empty result set. (Empty table)
Attached is a snapshot from MySQL.
The other snapshot is from the Run Email Reminder Notification.
Thanks
Calvin
Hi Lewis,
Okay, I tried it with my actual CRM server and it works. By setting deleted = 1, you wonāt see the job log in SuiteCRM but the records are still in MySQL table. Would manually deleting these records from the table cause any fatal results?
Calvin
Hi Calvin and anyone who could help me.,
I have the same problem here. Did you finally manually deleted records from the job_queue table in phpmyadmin? did you have any problems if you did it?
Thank you very very much.
Regards.
Got exactly the same question.
In under 1 week the table got 17k of lineā¦
Iāve dropped everything with : DELETE FROM job_queue
Hope someone can help us ā¦
I donāt recommend a simple āDELETEā like that, itās better to use that clause āWHERE status = ādoneā;ā or even add a clause to delete just stuff older than a week, for example.
If your problem is that the lines are still getting added at a fast pace, then check the content of the lines to see exactly which job is creating the lines, so you can examine it.
I can maybe do a view that execute every week to delete log that are older than 1 week, maybe ā¦
Yes, you can.
But if youāre really getting 17k rows added every week, you should try to stop the issue at its source. Otherwise your system will be doing quite a lot of useless workā¦
That was because every minute those 4 schedulers made a line in the log :
Iāve desactivate some, Iāve made to every 6 hours some otherā¦
Note that the default Scheduler jobs configuration should work well, and is not a problem for your server. Itās ok to have jobs running every minute (theyāre not really doing anything complicated most of the time, just checking that they have no work to do and exiting). Itās also ok to have lots of stuff in the logs.
What is not normal, and what you should be focusing on, is getting a huge number of stuff on the job queue. I am guessing you have a rogue Wrokflow process or something causing problems. So I repeat my advice, let it fill the job_queue with stuff for a while, and then diagnose the content of the rows in job_queue table. Then you will know what your problem is.