mysql - Python MySQLdb crashing randomly without errors -


i'm using python mysqldb perform calculations on large 75m row database. basic program flow iterate through every row, process data, use cursor put new data in row. processing complex pure sql.

db1 = mysqldb.connect(host=host, user=username, passwd=password, db=database) db1.ping(true) cursor1 = db1.cursor() db = mysqldb.connect(host=host, user=username, passwd=password, db=database) db2.ping(true) cursor2 = db2.cursor()  cursor1.execute("select * table") row in cursor1:     cursor2.execute("select * table")     new_data    = process_stuff(row)      cursor2.execute("update table set column = '%f'", (new_data))  db2.commit() db1.close() db2.close() 

this works, usually. though, silently quits no error message. sometimes, not always, give "mysql has gone away" error.

it's rather slow. know it's large database, takes 24 hours process everything. it's decent machine 24 gb of ram, should take long? i've spent hours fiddling my.conf, no real gain.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -