#125 executemany limit

MySQLdb-1.0
closed
Andy Dustman
MySQLdb (285)
5
2012-09-19
2005-01-26
Anonymous
No

I get odd errors when I send large amonts of data to
the executemany function. If I print the data to a text
file it takes up about 1 Meg.

The errors are:

"MySQL server has gone away"

"Lost Connection to MySQL server during query"

If I reduce the amount of data passed to the function
it works perfectly.

Discussion

  • Andy Dustman
    Andy Dustman
    2005-01-26

    Logged In: YES
    user_id=71372

    What version of MySQLdb (and MySQL, and Python) are you using?

    Try experimenting with this option in your server and client:

    http://dev.mysql.com/doc/mysql/en/packet-too-large.html

     
  • Logged In: NO

    Thanks for this info - it all makes sense now.

    I think for my needs I will keep the packet size at 1MB and
    just break up any large insert operations into smaller chunks.