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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -