ERROR in mysqli_driver.php |
Hello.
I am having a problem with mysqli_driver.php. ERROR - 2018-01-21 16:06:50 --> Severity: Warning --> mysqli::query(): MySQL server has gone away ...\system\database\drivers\mysqli\mysqli_driver.php 305 ERROR - 2018-01-21 16:06:50 --> Severity: Warning --> mysqli::query(): Error reading result set's header ...\system\database\drivers\mysqli\mysqli_driver.php 305 ERROR - 2018-01-21 16:06:50 --> Query error: MySQL server has gone away - Invalid query: SELECT * FROM `shoes` WHERE `strId` = '0047TANWU' LIMIT 1 The table `shoes` is have 530 000 rows... How can I fix this error? (01-21-2018, 08:58 AM)php_rocs Wrote: @nvv, CI = 3.1.7 APACH-PHP7 MySQL-5.7 PHP7 Until the error, everything worked fine. Now everything is working fine. Increased the parameters in the mysql config. But the mistake was. Perhaps you need to test this point. Thanks!
This can be caused by lots of different things.
Code: mysql/bin/my.ini This should be set to FALSE because it causes problems. PHP Code: // ./application/config/database/php Reconnecting / Keeping the Connection Alive If the database server’s idle timeout is exceeded while you’re doing some heavy PHP lifting (processing an image, for instance), you should consider pinging the server by using the reconnect() method before sending further queries, which can gracefully keep the connection alive or re-establish it. PHP Code: $this->db->reconnect(); You may also need to raise the MySQL packet size... What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |