I am getting following error in my php error_log
PHP Warning: Error while sending QUERY packet. PID=29770 in /home/test/test.php on line 87
And on line 87 in my php script the code id
$DBH->beginTransaction();
And after that when i commit i get the following error
exception 'PDOException' with message 'There is no active transaction' in /home/test/test.php:98
I have already set the max_allowed_packet=512M
and my table is InnoDB
What is wrong here?
EDIT: My code is running in a loop to insert total 100,000+ records into the table i am doing 5000 multiple inserts in each transaction. This is my code structure
beginTransaction
Multiple insert query for 5000 records
commit
Running in a loop to insert 100,000+ records. Sometimes the script runs successfully sometimes it fails.
I get this error in the middle of 6-7 loops.(after inserting 30k to 40k records)