Reputation: 29
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.
Upvotes: 1
Views: 12836
Reputation: 1146
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;
Upvotes: 3