How To

[Solved] MySQL: Error while sending QUERY packet. PID=XXX” with Magento 2 Migration

Hello Magento Folks ?,

How are you doing? Welcome to Magento Blog series. Today I will guide you How to Solve Error “MySQL: Error while sending QUERY packet. PID=XXX” in Magento Migration. By any chance, you missed our last published article, take a look at How to Disable Payment Method Programmatically in Magento 2.

Introduction

As you all know Magento 1 has come to an end in June 2020.  So, most of the E-commerce businesses have been migrated to Magento 2. If you are not a developer person you can seamlessly migrate your Magento store at Magento Migration Service. In the migration process, one needs to transfer the data to the database. While transferring, the session time out limit might not be exceeded which can be the cause of receiving MySQL: Error while sending QUERY Packet. Perhaps, the other reason for the error could be the data being bulky for large businesses.

Hence, the solution for it is right here. I have mentioned two ways: one is by changing the code and another is by increasing the value of memory size and execution time to resolve the error. Let’s execute it ?

Steps to solve the error “MySQL: Error while sending QUERY Packet. PID=XXX in Magento Migration:

The first way is to change the code.

Step 1: First of all, go to the following path:

vendor\magento\data-migration-tool\etc\opensource-to-opensource\1.9.X.X\config.xml

Step 2: Find below tag

<bulk_size>0</bulk_size>

<direct_document_copy>0</direct_document_copy>

Step 3: Replace to this

<bulk_size>100</bulk_size>

<direct_document_copy>1</direct_document_copy>

The second way is to expand the value of memory size and execution time.

Step 1: Change below value in php.ini

memory_limit = 2048M

max_execution_time = 180000

Step 2: Change below value in MySQL file

max_allowed_packet = 504288000

innodb_log_file_size = 3000000

wait_timeout = 4500000

After changing the above value, restart the server.

That’s it.

Final Words:

Therefore, by executing the above steps you will be able to solve the error “MySQL: Error while sending QUERY packet. PID=XXX” in Magento Migration. If you face any trouble write in the comment section below and I will solve it. Share the article with your Magento friends too.

Happy Coding ?

Click to rate this post!
[Total: 2 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

18 hours ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

18 hours ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

2 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

5 days ago