Hi,
I have millions of rows in some table to delete regularly through a Job in a queue with following instructions
'DB::table('data_smth')->where('fetch_stamp','<',$limit_3m_date)->delete();'
It happens my code had some bugs so it didnt delete for 1 year which means the job need to clear now around 60 millions rows in the specific table.
While everything is ok for deletion on other tables, i keep having for this table in production :
'General error: 1205 Lock wait timeout exceeded; try restarting transaction in /home/forge/website.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:142'
In local server everything is all right.
I tried to increase
wait_timeout
on MariaDb server on digital ocean but no effect
Trying for test only
DB::table('data_smth')->where('id','=',1)->delete();
send the same exception.
For info this table is almost permanently access by some other jobs in a queue which are adding new rows of data from differents external sources...
I searched a solution the entire day but i am still strugging. thks for help