Got Error "MySQL server has gone away"? what is the solution for this?

I got these 2 error

  1. “Packets out of order. Expected 0 received 45. Packet size=4739923” &
  2. “SQLSTATE[HY000] [2006] MySQL server has gone away” HELP ME Same application working other server but it’s not working here, please help me.
Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I already increased maxallowed_packet and restart mysql, but that problem is not solved. Please give any other solution to solve this issue.

Your mysql server has probably timed out and might be fixed by checking if the wait_timeout mysql variable in your mysql configuration file (my.cnf) is large enough. It could also be caused by an incorrect or a too large packet. You can fix this by increasing the packet size limit max_allowed_packet in my.cnf file. After doing above restart your mysql server.