1

Hi i am using codeigniter framework. I am running one query and request data from mysql. I have lot of data. It is running but gives the error as below.

A PHP Error was encountered Severity: Warning

Message: Error while sending QUERY packet. PID=182364

Filename: mysqli/mysqli_driver.php

Line Number: 305

I have asked my service provider to increase max_allowed_packet size. Previously I've 245M. they increased it 500M. But there are problems with restarting the server. So, i want to increase it without restarting the server. Is it possible?. If it is possible please suggest how to set and where to set.

Manav
  • 553
  • 7
  • 18
Mythili
  • 29
  • 1
  • 1
  • 5

1 Answers1

2

max_allowed_packet This server variable can be set globally by running a query.

However, if you do not change it in the my.ini/my.cnf file, the value will reset when the server restarts, even if you set it globally.

To change the setting for everyone until the server restarts:

SET GLOBAL max_allowed_packet=1073741824;
AbdulAhmad Matin
  • 1,047
  • 1
  • 18
  • 27