views:

383

answers:

1

When doing an INSERT with a lot of data, ie~ `INSERT INTO table (mediumtext_field) VALUES ('...lots of text here: about 2MB worth...')', MySQL returns "OperationalError: (2006, 'MySQL server has gone away')"

This is happening within a minute of starting the script, so it is not a timeout issue. Also, mediumtext_field should be able to hold ~16MB of data, so that shouldn't be a problem.

Any ideas what is causing the error or how to work around it?

Some relevant libraries being used: mod_python 3.3.1, MySQL 5.0.51 (on Windows XP SP3, via xampp, details below)

ApacheFriends XAMPP (basic package) version 1.6.5
  • Apache 2.2.6
  • MySQL 5.0.51
  • phpMyAdmin 2.11.3
+1  A: 

check the max_packet setting in your my.cnf file. this determines the largest amount of data you can send to your mysql server in a single statement. exceeding this values results in that error.

longneck