|
|
|
|
![]() ![]() |
Jul 8 2008, 03:04 AM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 48 Joined: 5-February 08 From: Japan Member No.: 28,155 |
I have a small application that spawns several threads which produce output that I insert into the database. The output from one thread is an array and I use
CODE cursor.executemany . In the beginning I was always getting the mysql error QUOTE lock time exceeded try to restart the transaction ...I managed to resolve this issue - partially it was coming from IDLE editor and the open python shell - seems they were not unlocking the tables while open - so in order for my code to run I use to run it from the shell ... The next step to handle this was to lock the table before every insert - despite that each thread is using its own mysql connection ... At this stage the error still occurs - and this results in loss of data and CPU usage.... Any exerience related to python and mysqldb and executemany and threading will be greatly appreciated! |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 09:24 AM |