I have received MySQL error 1160 'error writing communication packets'. I have a stored procedure that does this: step 1: compares the data from two tables and insert into a tmp table. step 2: Results from tmp table will then copied over to a table with FEDERATED engine. This Federated table is connected to another table on a different server. I wish to know if there is anything wrong with step 1 or 2 from above that may cause this error? The error does not always pop up. Once in a while it will pop up but is random. I also wish to know if this error will cause major data integrity issue or errors in my data.