PHP Warning: mysql_query(): MySQL server has gone away
am 26.11.2009 17:11:54 von m5I have a query...
INSERT IGNORE INTO archive.history2 SELECT * FROM main.history2 =
ORDER BY main.history2.id ASC LIMIT 1000000
....that after a certain number of records in the LIMIT clause, fails. =
Specifically, it fails when run at the command line (as a PHP script) =
with the error:
PHP Warning: mysql_query(): MySQL server has gone away
However, the same query executes fine when run at the mysql command =
prompt, or from within Sequel Pro -- can execute it with a LIMIT clause =
of 2 million. So, it appears I'm exhausting some MySQL limit or system =
resource, but before I go blindly raising values, I would like to =
understand which ones can cause this. About the query, it's meant to =
archive old records from one database table to a different database. It =
works fine on smaller history tables, but on bigger ones, with more than =
500,000 rows, it starts to fail.
What sorts of limits would this start to hit from a PHP command-line =
script, but not the interactive MySQL shell?
....Rene=
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg