You're probably trying to delete too much data. Check this documentation on what you should do:
Indeed issue was because i was trying to delete too much data. Using the script provided in the documentation resolved the issue. Thanks for the help!
Hi,
Just observed that the script is deleting the records but even after deleting the records, the command is still running.
Any idea why this is happening? Is the script not able to come out of the loop?
It's probably still cleaning the data.
I have checked the tc_positions table, it deleted records for one day, now its not deleting any record but command is still running.
The script checks for certain output. Try checking what output you get when you run the query.
I just modified the script to delete 40000 rows and print the "result" variable output after each loop iteration. Its printing the below output after each iteration but once all the records are deleted it prints "ERROR 1206 (HY000) at line 1: The total number of locks exceeds the lock table size". I suppose that's why loop is not able to terminate.
Very possible.
Hi,
I have one bash script to delete records from tc_events table and tc_positions table. Attaching script screenshot for your reference.
This was working fine till around 28-30Aug but now when i checked i can see records are not getting deleted for tc_positions table. Records for tc_events are still getting deleted issue is only with tc_positions table.
Even when i tried to run this command using MySQL command line, i was not able to delete the records in tc_positions table and the cli was stuck at the DELETE command.
Traccar Version - 6.4
MySQL Server Version - 8.0.39-0ubuntu0.22.04.1 - (Ubuntu)